los_shadows
los_shadows

Reputation: 33

One Specific Facebook Status on Website

I would like to build a website where user can post on of their Facebook status messages by submitting the URL of the status.

(The URL can be retrieved by right-clicking on the " ago" under the status message and copying the link.)

To make it more clear: I do not want all status updates from a user, just a specific one - Therefore I want to use the URL which leads directly to the status.

Upvotes: 1

Views: 218

Answers (1)

Lix
Lix

Reputation: 47976

If you really want to have :

right-clicking on the " ago" under the status message and copying the link

In your application's flow, then you could parse the URL that is there to extract information about the post/album/photo/status/etc...
Remember that a user could click on anyone of those types of posts
The URL would look something like this :
https://www.facebook.com/rozen.lior/posts/10150498318655888

From that URL you can extract the ID of the post - 10150498318655888 and query it through the Graph API like this :
https://graph.facebook.com/10150498318655888...

If you only want "status updates" then you will have to make sure that the link that the user has given is indeed a "post"... For example a URL taken from the same place of a photo album would look like this :

https://www.facebook.com/media/set/?set=a.XXX.YYY.ZZZ&type=1
There are 3 groups of numbers here (XXX,YYY,ZZZ) - the first batch of numbers is the same as the post ID - only it will give you details of the photo album instead.

You can experiment by using the Graph API Explorer

Upvotes: 1

Related Questions