I'm trying to get the number of Facebook likes using the API for the page of the organization I work for - https://www.facebook.com/giftoflife. (The number is about 150k.)
https://graph.facebook.com/110653755631234/insights/page_fans simply returns no data (I'm using the correct access token).
What am I doing wrong?
EDIT
I need to use the insights API specifically, as I need to get the likes within a specific date range.
Getting the number of likes for a Page is actually a lot easier, you donĀ“t need the insights for that, and only an App Access Token:
https://graph.facebook.com/giftoflife
You only need a User or Page Token for that if the Page is restricted (age/country).
If you want to get access to Insights, make sure you got a Page Access Token with the read_insights permission. You can debug your Access Token here: https://developers.facebook.com/tools/debug/
Related
In the past, I think a Facebook Page access token could be generated manually, and then used with the graph API to query posts, comments, likes, shares, etc. Now it seems you cannot query anything without developing an app that I login to and then in turn the app generates the access token. Is that true? For example, this question from 2015 claims no access token is needed for public data, but when I try their example it returns "An access token is required to request this resource."
I'm the admin of my page that ran a basic contest (giveaway). I'd like to use the graph API to fetch the names of people that liked, shared, or commented on a post. Then I want to cross reference it with those that like the page. Do I have to register and develop an app for this? Does my page have an access token available without going through the app registration and review process?
Can I access a Facebook Page with the Graph API without creating an app?
No, that is not possible. You always have to use an App for any API Access.
Then I want to cross reference it with those that like the page.
That is not possible either, not even with an App. I assume you want to make sure that participants like your Page - which is not allowed. People cannot be "incentivized" to like your Page.
Platform Policy: https://developers.facebook.com/policy/
Explanation about the specific rule against requiring people to like your Page: https://developers.facebook.com/docs/apps/examples-platform-policy-4.5
Despite all my research, I can't find a way to get this data via Graph API.
It seems that no permission matches with this...
Any idea ?
https://developers.facebook.com/docs/graph-api/reference/v2.2/page/ratings
Keep in mind that you need a Page Access Token for this, so you must be Admin of the Page. No extra permission needed, just manage_pages to get the Page Access Token, of course.
Getting the ratings for a specific User without accessing a Page is not possible afaik.
I am admin on an FB group and I want to get a feed of the latest posts for inclusion in a website. How do I do this? Excuse the simplicity of the question. However, I have done some research and I understand that I need an access_token, but do I really need to do some full oAuth stuff for a public group?
Yes you have to put access token to get feed but no need to worry this access token can't share your any details.it just a token to get feed.
You can generate your access token no. here.
https://developers.facebook.com/tools/explorer/?method=GET
And you can get feed for your page with following url:
https://graph.facebook.com/PAGE_ID/feed?access_token=ACCESS_TOKEN
Thanks
I'm trying to make a facebook graph api call to get a public(i.e. OPEN) group's feed.
When I go to the group's site there's quite a large feed, but when I issue the API call, I get an empty array.
I tried using an access_token parameter received from the group's adminitrator, but I still got nothing.
Do I have to request some specific permissions to receive the feed?
Note that on some pages I can get all data without extra permissions - e.g. the cocacola page:
https://graph.facebook.com/cocacola/feed?#{ACCESS_TOKEN}
My end goal is to have a list of all recent feed activity for the group on a third-party page.
Page access tokens are diffirent from user access tokens. So if you had an administrator access token, you have to get a list of pages that admin owns. Then in that list you can find page specific acces tokens. After gathering page access_token you can make the API call. But also you have to get Page access permissions.
1) GET admin's pages array with access_tokens
https://graph.facebook.com/[ADMIN-FB-ID]/accounts?access_token=[ADMIN-ACC-TOK]
2) Then get the page access token from returning array
3) Finally you can call page's feed api.
Hope it helps,
When I fetch tagged photos for a user I only get a certain set even after requesting the friend_photos_videos/user_photos/user_photos_videos tags and basically any other permissions list.
However doing a sample call from the fb oauth overview site gives me the entire list of tagged photos for myself with their generated access token...how is this possible?
Just wondering if anyone else has the same issue.