Getting Facebook Posts Permalink from Facebook Graph API Search

Posted by Alexia on Stack Overflow See other posts from Stack Overflow or by Alexia
Published on 2010-04-28T23:03:29Z Indexed on 2010/04/28 23:07 UTC
Read the original article Hit count: 684

Filed under:
|
|
|
|

I want to use the Facebook Graph API to search the public status updates concerning a keyword. For example, this works great: http://graph.facebook.com/search?q=obama&type=post

It shows me all the posts with the word "obama" in it. If the post is a picture, it actually returns a field called "link" which is the permalink to the picture on the actual Facebook website, in the user's profile. Which is exactly what I want, but for pictures.

But if the post in question is just a status update, i.e. just text, all it returns is the 3 fields: message, created_time, and updated_time. How do I view this actual status update on www.facebook.com? I realize I can view it on graph.facebook.com in JSON format, but I want to actually be able to show the permalink to the status update, or post.

The final result I would like to retrieve might look something like this:

http://www.facebook.com/[user id]/posts/[post id]

With the [user id] and [post id] fields swapped out with the actual IDs, obviously.

TIA!

© Stack Overflow or respective owner

Related posts about facebook

Related posts about facebook-graph