- Home /
Facebook Share not found
I am trying to share to Facebook but without success so far. I created 2 method just to test. The first one (Share), actually shares, however it does not grab the image or any of the text. It's just a NOT FOUND link, which redirects to the URL of the game in playstore.
The second method (Share2) does not work. When I click the button that calls it, the screen blinks really fast, and that's it. Nothing happens.
Here's the code:
using UnityEngine;
using Facebook.Unity;
public class FacebookManager : MonoBehaviour {
void Awake()
{
if (!FB.IsInitialized)
{
FB.Init(InitCallback);
}
else
{
FB.ActivateApp();
}
}
private void InitCallback()
{
if (FB.IsInitialized)
{
FB.ActivateApp();
}
else
{
Debug.Log("Failed to Initialize the Facebook SDK");
}
}
public void Share()
{
FB.ShareLink(
contentURL: new System.Uri("http://play.google.com/store/apps/details?id=com.Amazing.Color&hl=en"), contentTitle: "I scored points in the game!",
contentDescription: "i did pretty good",
photoURL: new System.Uri("https://i.imgur.com/gwx1Fta.png"));
}
public void Share2()
{
FB.FeedShare("the told is here",
new System.Uri("http://play.google.com/store/apps/details?id=com.Amazing.Color&hl=en"),
"Link Name is here!", "this is the link caption!", "and here the description",
new System.Uri("https://i.imgur.com/gwx1Fta.png"), "this is the media source");
}
}
Comment
Your answer
Follow this Question
Related Questions
facebook sdk share screen shot 0 Answers
integrate facebook with android 0 Answers
Facebook Share Score Link to Google Play 0 Answers
Unity Android - Image share to facebook fails 1 Answer
facebook sdk problem 1 Answer