Reputation: 37
i've been searching for "get last post from facebook fan page" i need to do this, and i look some posts at stackoverflow and i've been reading graph api too...
i'm using Asp.net MVC to build my app and Jquery/Js I need 4 informations when i get it. First, the post(text only), photo, likes and url.
i found it:
curl -F 'method=get' \
-F 'fields=about,attire,bio,location,parking,hours,emails,website' \
-F 'access_token={page_access_token}' \
https://graph.facebook.com/546349135390552
on https://developers.facebook.com/docs/pages/managing
i don't know how to use, someone can help me?
Upvotes: 0
Views: 1207
Reputation: 334
You want to retrieve posts, right?
First, you're seeing the wrong documentation, see this one >> https://developers.facebook.com/docs/graph-api/reference/page/feed/
You cannot only retrieve the last post using Graph API (using FQL, may be you can). So, to retrieve the last post, including _post(text only), photo, likes and url;
GET https://graph.facebook.com/v2.3/me/posts?fields=message,picture,link,likes&access_token={page_access_token}
The top post is the last one. If you want to retrieve photos, you can also request >> me/photos?type=uploaded
And, you don't necessarily require page access token as long as your page is published.
Upvotes: 2