Facebook Graph API allows getting Facebook objects like posts, videos etc in JSON from. Here is an example of a post: (taken from the documentation):
{
in the actions
field there is the link
field (for each available action) which happens to contain the permalink to the given post. However be sure to inspect this before relying on it - it might change. I've only used it with "comment" and "like".
Apart from that you'd have to construct it manually. For users that have their username set (i.e. their profile is accessible via facebook.com/username
, it works with:
http://facebook.com/USERID/posts/POSTID
For everything else:
http://www.facebook.com/permalink.php?id=USERID&v=wall&story_fbid=POSTID
Source: http://forum.developers.facebook.net/viewtopic.php?pid=316384
Note that the POSTID
is in the form USERID_POSTID
, so you'd have to strip the first part.