Access Facebook files in php

I am having trouble figuring out how to get data from the api chart, I don’t have sufficient rights to receive any returned data. In the Graph API, I created a new access token with the right to read information, but I do not know how to use it in php. I am currently trying to get the data as follows:

FacebookSession::setDefaultApplication('app_id', 'app_secret'); $session = FacebookSession::newAppSession(); $engagement = (new FacebookRequest( $session, 'GET', '/page_id/insights/page_engaged_users' ))->execute()->getGraphObject(); 
+5
source share
1 answer

Hope this helps others too ... regarding the Facebook access token, as well as the request How to handle access tokens using the SDK version 5.0 from Sammy Kaye Powers

+1
source

All Articles