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.
As answered by 林果皞:
The best way seems to be using facebook's FQL.
Related
Is there still a way to get Facebook comments from a site URL using Graph API?
I tried converting a site URL to an object-id, but it failed using Graph API Explorer.
Some older posts mention using /{object-id}/comments, some mention ?id=https://she.hr/nevjerojatni-spoj-dragocjenih-bisera-i-pouzdane-njege-uz-nivea-pearlbeauty-black-antiperspiranate/&fields=og_object{comments{message,from{name,%20picture}}}
But I couldn't get a single comment.
I also found fb_comment_id in comments' IFRAME, but couldn't get data on that one either on Graph API explorer (using /{comment_id}).
I'm wondering is it possible to edit/update a Facebook link post, which is already posted on the page.
It's a link post which is getting info from website meta tags, so I'm wondering if there's a way maybe through Open Graph to edit the meta tags, and the post would update itself?
Thanks
I've put a Facebook social plugin comments box on my site, in which i specified a Facebook Fanpage, as the comments target.
Now what I want to do is get all comments that are present in the comments box on page my page. I'm using this:
https://graph.facebook.com/comments/?ids=xxx
In place of xxx I placed my fanpage url (displayed comments just from one day even with limit set to 10000) and when this didn't work I tried my page url, which resulted in nothing being displayed.
The correct syntax to read comments from the Facebook Graph API is as follows:
GET /{object-id}/comments
So your URL would look like this:
https://graph.facebook.com/xxx/comments
Here's a live example that looks at comments on Coca-Cola's cover photo:
http://graph.facebook.com/10152297032458306/comments
You can read more about reading comments via the Graph API here.
check this stackOverflow topic
You need to call it from a secure request https and provide an access_token (19292868552_118464504835613 is Facebook post) :
( (19292868552) is the page or group id and (118464504835613) is the post id)
https://graph.facebook.com/19292868552_118464504835613/comments?access_token=XXX
EDIT:
Added the object from the post document. Try clicking the comments connection and then remove the access_token and try and see the difference.
I'm trying to implement a Facebook page timeline in a website with the open graph API from Facebook:
https://graph.facebook.com/{PAGEID}/posts?access_token={accessToken}&limit=5
This gives my a nice array of timeline objects. Per post I would like a like button for that specific single post. Does anyone know how to do this with PHP? I can't find any documentation about this 'like functionality' on the facebook developers site.
You can select the post id of the post you need and after that make a post request to 'https://graph.facebook.com/OBJECT_ID/likes'
For further reading you can visit:
https://developers.facebook.com/docs/reference/api/publishing/
And for testing you can visit:
https://developers.facebook.com/tools/explorer?method=POST
I know how to use Facebook Open Graph to create a wall post on any chosen member, however, I don't know how some applications post something like this:
The 'description' parameter contains 3 different urls. At first I thought they were posting HTML into the 'description' but it turned out Facebook blocks them in the first place.
Is there some hidden undocumented features of the Facebook API they are using? May be the old API had this but the new Open Graph doesnt?
The facebook app:
http://www.facebook.com/apps/application.php?id=20678178440
Facebook Post entity:
http://developers.facebook.com/docs/reference/api/post/
Are you just looking to use HTML? The "default" Wall is plain text. As far as I know you need to install an app to add HTML to your FB wall. Check out the app Advanced Wall to get HTML functionality.