For a project I'm required to crawl a few Facebook pages using the Graph API (and R). These pages are MonsterEnergy, RedBull and Rockstar. Monster and Rockstar work just fine, but the Graph API is acting up on RedBull. I can only get the posts that were made today.
Example:
https://graph.facebook.com/14226545351/posts?access_token={valid access token}
When going to the "next" URL, only an empty data array is returned.
I have all the permissions enabled on my access token, and I can see all their posts just fine on their page.
Any idea what could be causing this?
The Facebook tables dealing with the news feed have been hobbled by design. A call with no limits will only return either the last 30 days of data or 50 posts, whichever is fewer. If a page didn't post for more than 30 days, you can end up with nothing returned.
If you need more posts, rather than paging through them, you're better off passing a limit parameter to explicitly request more of them.
Try this:
https://graph.facebook.com/14226545351/posts?limit=100&access_token=ACCESS_TOKEN
Related
I'm using the Vimeo API to get paged data on my videos. I'm using the per_page and page parameters like so:
https://api.vimeo.com/me/videos?page=4&per_page=8
However, some of the pages of results do not contain 8 videos. For example my 4th page of results is only returning 6 results, yet page 5 has a full set, and there's many more pages. So it's not like I've ran out of videos.
I've checked the video's privacy settings and can't see any differences between the videos that are showing and the videos I'd expect to show on that page that aren't. I've tried setting a sort direction and that didn't help. I've also used the query parameter to search for the videos I think are not showing at they are being returned if I seach for them directly.
Also my auth token scope includes Public, Private and Video Files
I got in contact with Vimeo support. It's due to an issue on their and they have told me they are releasing a fix on the 21st of Feb 2023. In the meantime adding this parameter to the request is a workaround but this will be removed soon.
&include_disabled_by_min_tier=true
I am building an app, which lists all posts from a Page(that I manage and post to) and also gets corresponding posts view count. I looked into the documentation and it seems like the page needs a minimum of 30 Likes for insights API to work. Is this correct? Is there a way I can get the view count?
Here is the output from Graph Explorer. I have set the access token to Page Access token.
I am passing the Post_ID to HTTP GET. I can see directly from Facebook that the post has reached N number of people. But the returned data from the API call is empty. Any help?
Was wondering if anyone knows how to get the historical data for any Facebook Page.
For example, number of fans for RedBull fan page on a given day in the past or for a given period that ends today so that I can show fan development of any page over a given period.
I tried it with the graph API and FQL (insights) but no luck.
https://graph.facebook.com/{USERNAME}/insights?fields=likes&period('week')&end_time_date('2011-06-26') --> empty result
Pulling the data via FQL also returns no results, plus it seems without a read_insights permission nothing is possible for page data
I'd need this to be available with only a generic user access token. This data is publicly available anyway. Result should be somewhat like this: http://www.socialbakers.com/facebook-pages/australia/
https://graph.facebook.com/{{pagename}}/insights/page_views?access_token={{access_token_key}}&since=1420070400&until=1421625600
Since & until parameter in the above code takes in unix time.
add necessary information in the {{ }} and this code should work.
Without insight permission I recommend that you write something to perform a nightly query on the page graph and record the stats you need. If the page is public most of the information shown on that site is available.
You could also scrape info from http://pagedata.appdata.com if the page has already been listed...
I am trying to read a user's stream using the facebook graph api. the call is:
https://graph.facebook.com/me/home?access_token=xxxxx&since=yyyyy
I am getting a response but there are a few problems:
The result I get as a response is not identical to the stream I see as a facebbok user (many posts are missing - on facebook page, in the news feed, i can see much more posts than i get back in the response)
It seems that even if I use the "since" parameter, many of the posts returned are out of the time scope. Any ideas why? I would like to do paging according to specific time periods but it seems facebook api is not working as expected (it will return results earlier than the "since" parameter and it will not return all the posts i can see in my news feed).
thanks
It's easy to get these two connections from the user graph API object confused.
me/home is for the user's news feed
me/feed is for the user's wall
I would suggest using FQL via the Graph API and poll the stream table directly:
fql?q=SELECT post_id, comments, message FROM stream where source_id=me()
I'm pretty sure there's a bug logged at developers.facebook.com/bugs for the since parameter not working as expected.
I have tried posting to some different friends feeds. Sometimes the message does not show up on feed even if a get a "good" response back with a new graph api ID.
100002842168248_146917358746335 does not work for example
I don't get any errors or similar only a new ID for the post and when I try to access via graph api (developer console on FB) it return simply false?
https://graph.facebook.com/100002842168248_146917358746335
Using the same call but for another user is showing up on facebook feed without problems. Is there any more action I can take or should I simply take my "false" and give up.
It's probably a privacy/permission settings issue. If the user who's Wall you are posting too has it set so only Friends can view their Wall, you will not be able to view the post (via the Graph or otherwise) - even though your App made the post.
You can also get 'false' if, although the post is visible on Facebook.com with no problems, the user who posted it has opted out of Facebook Platform. This is a privacy setting which disables any apps from accessing any information about a user, their posts, etc.
Even if their posts are 'Public' on facebook.com, the API won't return anything about such users.