Search Unity

Facebook Plugin ShareLink's description broken?

Discussion in 'Scripting' started by NathanWarden, Jul 24, 2017.

  1. NathanWarden

    NathanWarden

    Joined:
    Oct 4, 2005
    Posts:
    663
    Hello,

    I'm having an issue where I'm using the official Facebook plugin for iOS/Android, but it fails to post the description even though it's showing that it will post the description. I've tried using a description that is the single word "Test" just to make sure it isn't breaking due to special characters. I've also tried using something more common like apple.com where it shows that it will post my description, then when I go to Facebook it shows the description from apple.com instead.

    Android from within the application. Notice it shows "I just planked for..."

    Screenshot_2017-07-24-17-10-37.png

    And here's what actually shows on Facebook. Notice the description doesn't show at all.

    Screenshot from 2017-07-24 17-13-11.png

    Also, here's an example of my code:

    Code (csharp):
    1. string messageString = "I just planked for {1} and scored {0} points using Stealth. Check it out!";
    2. System.Uri uri = new System.Uri("https://www.facebook.com/gameyourcore/");
    3. System.Uri imageUri = null;
    4. string timeStr = ScoreDataParser.FormatDurationWithMinutesAndSeconds (shareScore.duration);
    5. FB.ShareLink(uri, "Stealth - Game Your Core", string.Format(messageString, score /* string */, timeStr), imageUri, ShareResultCallback);
    Finally, here's a link to the official SDK documentation. Thanks!
    https://developers.facebook.com/docs/unity/reference/current/FB.ShareLink

    Thanks for any help,
    Nathan
     
  2. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    As I understand it Facebook have deprecated that functionality now but have not changed the SDK yet. I believe you now have to use og markup at your link to specify the relevant parameters.
     
    NathanWarden likes this.
  3. NathanWarden

    NathanWarden

    Joined:
    Oct 4, 2005
    Posts:
    663
    Thanks, that is a huge help and explains why it literally was working a week ago and now isn't :)
     
  4. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,187