Hello Unity Community!
I’m trying to create a facebook share option for my android game. Here’s some code:
public void ShareToFacebook(){
FB.ShareLink(
new Uri("la la la url here"),
"My High Score",
"Think you can beat my "+_score.ToString()+" score?",
callback: ShareCallback
);
}
private void ShareCallback (IShareResult result) {
if (result.Cancelled || !String.IsNullOrEmpty(result.Error)) {
Debug.Log("ShareLink Error: "+result.Error);
} else if (!String.IsNullOrEmpty(result.PostId)) {
// Print post identifier of the shared content
Debug.Log(result.PostId);
} else {
// Share succeeded without postID
Debug.Log("ShareLink success!");
}
}
However, the share that shows up contains only the link, no title or description show up. Any ideas why? Note that I only did the FbInit, and not the login as well. They said it’s not required.
Thanks for your time!