I've been messing around with the Facebook graph API and I'm trying to pull the most recent 100 posts on a public Facebook page (https://www.facebook.com/MACcosmetics/?hc_ref=PAGES_TIMELINE&fref=nf).
However, when I do this for some reason certain posts aren't being pulled through the API - for example, the post on November 5th is not shown in the json object, however, the post below it on November the 4th is. I can't see any difference between the post so I don't understand why this would be the case?
Is anyone able to shed some light on this for me...
I've also included the code I used to pull this data below.
Thanks in advance,
Harry
response = requests.get('https://graph.facebook.com/v2.8/16126780553/posts/?fields=message,shares,created_time&limit=100&include_hidden=True&access_token=XXXXX')
Related
I have a friend that runs a small nonprofit which helps find placement for dogs that have been brought to animal shelters. This organization has a Facebook page that allows volunteers coordinate and donate funds for these animals.
I had created an application that uploaded posts, downloaded and edited posts, and downloaded comments.
It did so using standard HTTP protocols with a Facebook Access Token. The token was obtained by going out to the graph explorer and copying it to the application.
This worked perfectly well until July – 2, when the two thousand or so post that were already uploaded and visible just disappeared. Oddly, it is now possible to use the tokens from graph explorer again, but they are giving erratic results and all the posts prior to July-2 are still missing.
Does anyone understand this behavior? And if so does anyone have any suggestions on how I could fix it?
Thank you,
Demetrius
Unfortunately, Facebook seems to have removed the ability to post from outside of their own apps.
See How to post to user's facebook feed
We are looking for a way to find out, if a comment is hidden on a story on a page feed. We are using the Graph API to get the comments: [story_id]/comments with an Admin Access Token. Facebook tells us if we can delete the comment. However, there is no "is_hidden" flag or something.
Is there any other way to find out if the comment is hidden/marked as spam?
Thanks!
I'm PHP Developer, we have also used Facebook Graph API many times.
As per my expertise, I think we cannot fetch/identify only hidden/spam comments.
But yes you can get the comments for only particular user if you want.
For example:
1.) Get id of a fanpage with public graph data: http://graph.facebook.com/cocacola - thumsup has 507267189335315.
2.) Get ThumsUp's "like plugin" iframe display directly with some modified params: http://www.facebook.com/plugins/fan.php?connections=100&id=40796308305
3.) Now check the page sources, there are a lot of fans with links to their profiles, where you can find their profile ids or nicknames
4.) If you are interested only in profile ids use the graph api again - it will give you profile id directly
I hope you will find my answer appropriate.
If you are getting some other solution, please share
Thanks,
Shreyas
By now, finding out if a comment is hidden can be achieved via the is_hidden flag.
More detailed answer on a similar question
Facbook API docs for comment endpoint
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.
Is there any limitation to post to the Facebook wall using Graph API? Because after posting four messages using the Graph API, the fifth message cannot be posted. However, the sixth message can be posted. All the six posts are within a 10-minute timeframe.
There is no rate limit on the API officially, but Facebook can choose to limit your posts for any number of reasons.
Also, Facebook will not let you post the same message twice. Even if it came from a source other than your application. So, you can't post the same update that the user posted directly or came in via Twitter, if they have that set to sync.
If you are getting a specific error I will update my answer with more direct information.
I'm trying to get some insights on a list of Posts by a Page on Facebook.
To be specific, I want to get the information highlighted in this blog post via the API.
But I can't figure out how, anyone knows how?
As far as I know it's only possible using the "stream" table. So you've got to use FQL to query this data. Using this technique you'll only get the impressions directly. Feedback rate can be calculated by adding #comments and #likes and dividing the result by #impressions. Hope they'll add this to the insights graph api as well.
MartinHN
Refer to https://developers.facebook.com/docs/reference/api/#analytics
If you are trying to aggregate multiple pages or a page other than the requesting app then you may need grant read_insights permissions to your application.
Refer to http://developers.facebook.com/docs/reference/api/insights/