• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed May 30, 2016 at 05:56 AM by Prasanna for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by Prasanna · Jul 06, 2015 at 08:36 AM · c#facebookscreenshotsharehash

Share image with hastag

Hi guys, This is android platform game, I creating the game which contain share option now in my game I can share images after taking screenshots. In that share content I have to add a default title and caption. For eg. I taken high score so I decided to share my image, I took screenshot and share into Facebook and more, now the user have to type title for the image, instead of I have to give the title pre-definedly for eg. #SuperContest. Is there any option to achieve this task. so far I created script for taking screenshots and sharing the screenshot in android method.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

  • Sort: 
avatar image
0
Best Answer

Answer by Mintonne · Dec 18, 2015 at 10:16 AM

You can't post pre-set text to Facebook... New policies.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Umresh · Jul 06, 2015 at 09:45 AM

Try

  wwwForm.AddField("message", "Your Message with #tag");

add this before calling FB.API

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Prasanna · Jul 06, 2015 at 10:21 AM 0
Share

I never used FB.API, I just simply use android intent for sharing the images, is there anyway to add the hashtag text into that, so far I used this script

 using UnityEngine;
 using System.Collections;
  
  
 public class ShareApp : $$anonymous$$onoBehaviour {
   
  string subject = "WORD-O-$$anonymous$$AZE";
  string body = "PLAY THIS AWESO$$anonymous$$E GA$$anonymous$$$$anonymous$$ GET IT ON THE PLAYSTORE AT LIN$$anonymous$$";
  
  public void shareText(){
  //execute the below lines if being run on a Android device
  #if UNITY_ANDROID
   //Refernece of AndroidJavaClass class for intent
   AndroidJavaClass intentClass = new AndroidJavaClass ("android.content.Intent");
   //Refernece of AndroidJavaObject class for intent
   AndroidJavaObject intentObject = new AndroidJavaObject ("android.content.Intent");
   //call setAction method of the Intent object created
   intentObject.Call<AndroidJavaObject>("setAction", intentClass.GetStatic<string>("ACTION_SEND"));
   //set the type of sharing that is happening
   intentObject.Call<AndroidJavaObject>("setType", "text/plain");
   //add data to be passed to the other activity i.e., the data to be sent
   intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_SUBJECT"), subject);
   intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_TEXT"), body);
   //get the current activity
   AndroidJavaClass unity = new AndroidJavaClass ("com.unity3d.player.UnityPlayer");
   AndroidJavaObject currentActivity = unity.GetStatic<AndroidJavaObject>("currentActivity");
   //start the activity by sending the intent data
   currentActivity.Call ("startActivity", intentObject);
  #endif
    
  }
   
 }

This script is working with all application except Facebook when I press whatsapp, it's add both string value but in facebook it's not working perfectly how can I add this into facebook. This is the exact thing I want.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

23 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

2 issues with Facebook Sharing in Window Phone 2 Answers

Share on Facebook 0 Answers

Android Facebook Share button in C#? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges