FB.ui sharing app result help needed

372 Views Asked by At

I have a javascript game app added as a page tab, it is a memory game which counts the number of turns needed to solve the puzzle. can anyone help me how to share the variable which holds the result with FB.ui share dialog?

 FB.ui({
method: 'share',
    message: 'some message',
    link: 'MY LINK ',
    picture: 'some pic',
    caption: 'Reference Documentation',
    description: 'you solved the puzzle in' + this.Moves + 'turns',   }, 

The app with the id is published on the page if that helps.

1

There are 1 best solutions below

0
andyrandy On BEST ANSWER

The Share Dialog is for sharing URLs only, and it takes the OG data from that URL. Earlier it was possible to use those parameters in your code with the Feed Dialog, but they are deprecated now: https://developers.facebook.com/docs/sharing/reference/feed-dialog

You could create a unique URL for it and include the score in the OG data of that URL, that´s the proper way as of now, afaik.