Hi ther I am working on a project for Android and I have a button. When the user press the button I want to give him/her the oportunity to share on facebook. This is the code that I am using:
public void ShareOnFacebook()
{
List<string> permission = new List<String>();
permission.Add("publish_actions");
if(!FB.IsLoggedIn)
FB.LogInWithPublishPermissions(permission, null);
FB.FeedShare(
string.Empty,
new Uri("http://linktoga.me"),
"Hello this is the title",
"This is the caption",
"Check out this game",
new Uri("https://i.ytimg.com/vi/NtgtMQwr3Ko/maxresdefault.jpg"),
string.Empty,
callback:ShareCallBack
);
}
void ShareCallBack(IResult result)
{
if (result.Cancelled)
{
Debug.Log("Share Cancelled");
}
else if (!string.IsNullOrEmpty(result.Error))
{
Debug.Log("Error on share!");
}
else if (!string.IsNullOrEmpty(result.RawResult))
{
Debug.Log("Success on share");
}
}
Now the problem is that when I test this on my Android device a Facebook window pops up with a message : "There was a problem. Please try again later". I am using Facebook SDK 7.4.0