I'm struggling in getting the posts from the public page in Facebook. For example
https://graph.facebook.com/cocacola
(Its a public page, those who liked it on facebook will get update.)
This returns me the page details only. How I can get the wall posts done by the user "cocacola".
Its quite simple. just do as
https://developers.facebook.com/docs/graph-api/reference/v2.2/page/feed
It will work.
I'm a bit late at the party but for completeness I would like to add:
Using the latest version 2.2 you can access the feed via the page id, eg:
https://graph.facebook.com/v2.2/PAGE_ID/feed?access_tkoen=YOUR_ACCESS_TOKEN
Individual posts can be retrieved too by their own id or via the feed.
https://graph.facebook.com/v2.2/POST_ID?access_token=YOUR_ACCESS_TOKEN
Maybe this was also possible with the older versions? Don't know, I'm just getting started.
Related
I tried to consume Facebook API which need to get the list of who liked my post in my page. Is there any endpoint available in v15.0 (latest) ?
For Example:
If I have a page named "Restaurant" and i have posted a story on that page's feed as "New restaurant on the way to launch" and peoples are liking that post. I want to retrieve who and all liked that post along with the total count. How is it possible ?
Also a question, if a private account is liking that post in that "Restaurant page", how will it be counted too and can we fetch those details too ?
I have tried with the URL, https://graph.facebook.com/101882636084088/feed to get the page feeds and https://graph.facebook.com/{page-id}_{post-id}/likes, but I'm not able to fetch likes.
I also tried, https://graph.facebook.com/{page-id}_{post-id}?fields=likes.summary(true), I'm not getting proper count or who and all liked as response. Have anyone came across this scenario ?
I'm trying to get all posts from a facebook page for the last two years. Access token is my own which has manage_pages, publish_pages, show_page_list.
The posts are there, they're moderately old early 2016, but, graph doesn't bring them back these older ones. They were scheduled posts, visibility=everyone and of 'photo' type. Any query on {page}\feed, {page}\photos, or {page}\posts yields only a couple of posts.
Facebook Insights Screenshot
https://pasteboard.co/Hde6ZWU.png
Graph Explorer Output Screenshot
https://pasteboard.co/Hde7iDP.png
Does anyone know how to enumerate these posts with graph, or know of the reason why graph isn't reporting them using the get/feed and get/photos command?
These aren’t photos, they are posts.
1409847682673697/posts?since=2016-01-01&until=2016-02-01
shows the first post from your dashboard screenshot, “Andrew Smith - Malta”, just fine.
This is a share of a post onto your page only - the “original” is https://www.facebook.com/andrewmsmithart/photos/a.1533059820295875.1073741827.1533035286964995/1648921165376406/ But since that is not a photo uploaded by your page nor has your page tagged in it, naturally it doesn’t show when you request your page’s photos.
The object_id field of your page post refers the actual photo object.
I was trying to setup a realtime update for one of my facebook app from a facebook page. I have tried each and every process described in facebook official api docs as well as other developers blogs. But no luck till now. My subscription is successful, I can see it both from api explorer and facebook url. My callback url also works perfectly. But when something new published in my page, I don't get any updates. Hoping anyone will reply who got it really working by him/her self.
Please do not suggest any facebook doc, I have already tried them.
I would like to know If it's possible to add a Check in on Facebook with PHP but without any Page id.
Because I have a database with a lot of places but I do not have a corresponding Facebook Page Id.
ANy idea?
To my knowledge, it is not possible to do a Check In without a page_id.
You can refer to How to get place_id before checkin? to find out how to get Facebook Page Id for your places.
It works posting on pages stories with:
postId + "/comments"
where postId is for example
postId = "360637130688291_377801902305147"
but when posting into a user's public story that allows comments like this one the graph api is not able to find it.
"1430496489_4047336948376/comments" gets a reply as :
{"error":{"message":"(#100) Error finding the requested story","type":"OAuthException","code":100}}
Is this a common issue or am I doing something wrong?
I have tested it in the http://developers.facebook.com/tools/explorer with all permissions on, and it seems this is impossible.
Probably to avoid spam, otherwise anyone could start creating applications that would run through posts on other users walls, and leave a comment there with a link to the nearest porn site.
Strangely this works for posts on third party owned pages.