I get data from the Facebook insights via Facebook Graph API more than year. And recently started all my requests (like {id}/insights
) to return with an error: (#190) This method must be called with a Page Access Token
.
But the Access token contains scopes manage_pages,read_insights
.
Any ideas?
相关问题
- facebook error invalid key hash for some devices
- LoginActivty with Firebase & Facebook authenticati
- facebook “could not retrieve data from URL”
- JDK 11. javax.net.ssl.SSLPeerUnverifiedException:
- setRequestHeader Content-Type causes POST request
相关文章
- Facebook login for group members
- The method FB.api will stop working when called fr
- React native deep linking vs Facebook SDK conflct
- UIActivity with no settings for Facebook
- facebook send API Error Code: 100 API Error Descri
- How to fix 'Facebook has detected MyApp isn
- Can't use Facebook Account Kit: Error inflatin
- Facebook API error subcode 33
manage_pages,read_insights
This will give a user
access_token
, that u can use to manage pages & check insights,But a page token became required for any
/insights
endpoint since 5th feb 2018Use your
manage_pages
scope &user_token
to get a Page access tokenSend a get request to this endpoint
Output
You can use the returned access token to call
/insights
endpoint now.As I cant add comment I'll write it here.
Field name is
access_token
which you can check here with your page id.https://developers.facebook.com/tools/explorer/?method=GET&path=page-id%3Ffields%3Daccess_token&version=v2.12
For PHP
If you had your script in PHP, using Facebook SDK for PHP and now it brokes, you just need to retrieve token and pass it instead of access/refresh token you were using.
I think its easily adaptable to other languages too. Also you can (and propably should) store page access token and use it wherever you need, instead of retrieving it each time.