1
votes

When using Facebook's Open Graph API to get a list of posts, what we get is a post id like XXXX_YYYY which can be converted to facebook.com/XXXX/posts/YYYY

But these links cannot be used with the facebook embed plugin : https://developers.facebook.com/docs/plugins/embedded-posts/

Eg - https://www.facebook.com/permalink.php?story_fbid=229021587215556&id=11239244970&stream_ref=10 works, but https://www.facebook.com/11239244970/posts/229021587215556 doesn't, even when both the URLs load the same post.

How can I fetch the permalink for a post so that it can be used in the embed box.

1
I'm sorry, but you're wrong because both works with the embedded posts plugin :) and here's an example (check the source) you will see that data-href is in http://facebook.com/{user}/{postId} format retrogram.eu/demos/adamsposts - Adam Azad
@Adam Azad : Here's how I see those posts : i.imgur.com/VpuzLtT.png - Sid Verma
I'm not sure it solve your problem or not, but you can get permalink via FQL, e.g. developers.facebook.com/tools/explorer/…' - Fruit
well, that's because I used an app access token (privacy issues), but as you can that format works pretty well - Adam Azad
The FQL works really well, thanks. - Sid Verma

1 Answers

0
votes

As answered by 林果皞:

The best way seems to be using facebook's FQL.