I am having issues figuring out how to get data from the graph api insights, I dont have sufficient rights to get any data returned. In the Graph API explorer I generated a new access token with the right to read insights but I dont know how to take it into use 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();
Hope this helps others too.... regarding Facebook access token and also in query How to handle access tokens with Facebook SDK v4.0 by Sammy Kaye Powers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With