I am fetching posts from a public facebook page that has several contributors including myself.
When I use the graph explorer I see all of the posts, but for some reason it strips posts that I personally share when I use the PHP SDK, but includes other peoples' posts.
Here is the graph explorer with all of the posts. The first post is not included in the result set with the PHP SDK. Graph Explorer Link
Did you check the posts across all pages, since there is a pagination? There is a method called getRequestForNextPage() in the FacebookResponse class, which will create the request for the next result set.
Related
I'm using Graph API to fetch my page feeds. I call
$pageID/feed?fields=created_time,object_id,story_tags,story,full_picture,picture,message_tags,message,caption,child_attachments,attachments,description,admin_creator,from
It gives me the feeds in my page which is fine. But, I also want the list of posts where anyone has mentioned my page in their posts in their own walls. I have gone through https://developers.facebook.com/docs/graph-api/reference/v2.9 but could not find a way to do that. Does anyone has any idea if that is possible?
If yes, then how?
There is the /{page-id}/tagged endpoint; but that will only return posts by other pages that have tagged yours, and only if those pages are “authentic” (which likely means verified.)
And user posts are not available at all to your app, not even if they are public - unless the user explicitly granted your app permission to read their posts.
I wanted to fetch most popular posts from a facebook page using Graph API. I tried https://graph.facebook.com/%pageId%/posts, But with that API I am getting recent posts from page. I wanted to filter the result with most popular posts (i.e., most shared, liked and commented). Can any body help me out how to get the popular posts from the page using the graph API.
Thanks,
Siva.
You can't get popular posts directly from Facebook Graph API. You can fetch the posts using the Graph API (/{page-id}/posts), then count likes, shares or comments of a post by yourself (/{post-id}/likes, /{post-id}/comments, /{post-id}/sharedposts) and then sort all the posts.
References:
1.https://developers.facebook.com/docs/graph-api/reference/v2.3/object/comments
2.https://developers.facebook.com/docs/graph-api/reference/v2.3/object/likes
3.https://developers.facebook.com/docs/graph-api/reference/v2.3/object/sharedposts
i already found a way to get posts without an access token:
https://www.facebook.com/feeds/page.php?format=rss20&id=121136164607942
https://www.facebook.com/feeds/page.php?format=atom10&id=121136164607942
With the URLs above you can get the newest posts, but what about the older ones? I basicly wanna achive what facebook already got (load the newest posts and then there will be a button "load more"). Including an IFrame is not an option. I want to make the facebook posts responsive.
Does somebody know if theres a way to get the older posts? I already tried adding &offset=10 but it doesnt seem to affect anything.
The old Page Feed endpoint will stop working soon. Use /v2.3/{page_id}/feed instead, then you can also use the since parameter.
See
https://developers.facebook.com/docs/apps/changelog#v2_3_90_day_deprecations
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.3#paging
Page RSS Feed endpoint - at https://www.facebook.com/feeds/page.php is now deprecated and will stop returning data from June 23, 2015. Developers should call the Graph API's /v2.3/{page_id}/feed endpoint instead. This returns JSON rather than RSS/XML.
I was wondering if it is possible to search (and retrieve the content of) a particular user's PUBLIC posts in Facebook using the facebook API - but only those posts between which contain a certain #hastag OR #mention and that fall between 2 timestamps.
We already do similar with our users' Twitter feeds using their api.
Thanks
In facebook developers api page it says:
A Page in the Graph API.
The fields shown below are some of the common fields of Facebook Pages. Pages may also contain other (or additional) category-specific fields.
Does anyone know how to retrieve those additional category-specific fields???
I´ve been looking on Internet but not a clue :-(
The doc for the facebook 'page' table shows fields and lists what category of page they are available to:
https://developers.facebook.com/docs/reference/fql/page/
For example, the band pages have a 'band_members' field that no other page type has. You should also check out Facebook Graph API batch requests which you can use to query for something and use the result in a second request using JSONPath notation. Do a search on this page for JSONPath and you'll see it near the bottom under the 'Specifying dependencies between operations in the request' section:
https://developers.facebook.com/docs/reference/api/batch/
Hope that helps!
-Kyle