Facebook Page Likes over time - facebook-graph-api

I'm not the owner of a facebook page (eg. TESLA) but I'm trying to use graph api to get the number of user that liked the pages over time. Based on graphi api documentation (insight/page_fans), I'm just getting empty json documents. Any ideas how I can get this data?

Only two page-related metrics are available publicly, page_fans_country and page_storytellers_by_country.
Everything else is only accessible to an admin user of the page, resp. using a page access token.
You can not get the data you want for pages you do not have admin access to.

Related

how can i get data insights from pages facebook without have role admin or analyst in this page with graph api?

I need to get data insights from pages facebook without have role admin or analyst in this page with graph api, just with application registration.
Before your app can make calls to read, update, or post to Pages you need to get a page access token. With this token you can view Page settings, make updates to page information and manage a Page.
Graph API Doc : https://developers.facebook.com/docs/pages/access-tokens

Facebook Graph API - Can't access some Pages

I am using an external server to retrieve events from multiple Facebook Pages. In about 1% of all cases, I get an error of the following type:
Unsupported get request. Object with ID '...' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
The common link I've found between the Pages that aren't working is that they are kind of private: if you log out of Facebook, you can't access their page, even though you can access other pages.
I am using an App Access Token to do this. Is there a way to access these Pages' events anyway?
UPDATE
I've found some explanation in the Facebook Docs.
Permissions
For pages that are published, you need:
An app or user access token to view fields from fully public pages.
A user access token to view fields from restricted pages that this person is able to view (such as those restrict to certain demographics like location or age, or those only viewable by Page admins).
A page access token can also be used to view those restricted fields.
This probably means that these particular pages aren't "fully public pages". Is there still some work around?

How to query Facebook's graph API from an app instead of a page?

Following my question (to which I self-answered): Is possible to use Facebook's (Page) Graph API without having an role in that page?
I would now like to know if I can get an access token for an app (created in https://developers.facebook.com/apps/) instead of a page (of which I can get an access token in Graph Explorer), to query Facebook's graph API?
e.g. with my page's (which is not the page I'm querying the graph about) access token:
GET https://graph.facebook.com/24HourFitness/posts?access_token=(*)
(*) access token generated in Graph Explorer (page access tokens) for one of the pages I admin
This is much too broad. It will always depend on WHAT you want to query with the App Access Token, because not all object allow using App Access Token, but require a User or Page Access Token...
Refer to the object's docs to see if it's possible for the purpose you desire, e.g.
https://developers.facebook.com/docs/graph-api/reference/page#Reading
says
Permissions
For pages that are published, you need:
An app or user access token to view fields from fully public pages.
A user access token to view fields from restricted pages that this person is able to view (such as those restrict to certain demographics like location or age, or those only viewable by Page admins).
A page access token can also be used to view those restricted fields.

Is possible to use Facebook's (Page) Graph API without having an role in that page?

For example, let's say I need to "crawl" (not manually since it looks against Facebook's policies but via graph API) some information from a Facebook's brand page (e.g. https://www.facebook.com/nike/ ).
For example I may need to collect the following fields from a set of brand pages (not just one, such as the one mentioned above, for which I could definitely do it manually), when they are publicly available:
("About tab")
- description
- address
- website
- ...
I was reading Facebook's graph API docs and permissions.
However these permissions are related to users and I already worked with that. What I learned it that it works by
Facebook login --> auth the app to use my data --> the app has access to my data as a Facebook user.
However I'm now interested in brand pages for which I found this docs and this (access token). However it seems that to be able to use this access token I need to be a user with some role in the page (e.g. admin) and not any user who just liked that page.
So, is it possible to access brand pages' data (read-only, i.e. GET) via graph API without actually owning/admin/publishing on that page?
Apparently no "special" access token is required to access pages' public info.
For example I can create any page (not app) in my Facebook account and then use
GET https://graph.facebook.com/(*1)/feed?access_token=(*2)
(*1) the page's name (nike) or ID
(*2)my "bridge" page (i.e. empty page, only used to have an access token. not the page I'm using the graph api on)'s access token
Similarly for /posts/ etc.

Montreal Canadiens Facebook Graph API returns no posts

I'm using the Graph API to return Facebook posts from all NHL teams. Every team returns the posts fine except for the Montreal Canadiens, which returns no posts. I verified that there are posts on their wall, and that the Facebook ID that I used is correct(see here)
I get back an empty JSON list when I try using this link for the Canadiens:
https://graph.facebook.com/110877132302973/posts?access_token=(my access token)&limit=10
Any help would be appreciated! Thanks.
Haotian
The posts on that page all have a custom privacy setting - you need to make sure you're attempting to access them using a User access token for a user that meets whatever restrictions they've applied.
App or page access tokens won't be able to see the posts, nor will user tokens for users who don't meet the restrictions