Edit: I've managed to get this far in the documentation: https://developers.facebook.com/docs/graph-api/reference/v2.5/promotion-info
However there's nothing linking to the {promotion-info-id} parameter in the docs that I could find.
I'll accept an answer with code/API references that's not specific to PHP as well.
I'm trying to fetch my users pages and posts insights which are working as expected, however I also need to receive stats such as per 1000 reached (cpm), total spent and new fan costs.
I am able to receive all user pages and posts however the insights API doesn't return any associated costs. I've looked at the Marketing API, but can't figure out how to link the pages and posts to those stats. How do I get the ad_account/ad_campaign values from posts and pages? Do I need them at all? Feeling quite lost in its API.
I also need to fetch the stats on a daily basis in order to calculate daily and monthly changes.
I can pull most daily stats using the insights API but there are no costs attached and https://developers.facebook.com/docs/graph-api/reference/v2.5/page nor https://developers.facebook.com/docs/graph-api/reference/v2.5/post offers no such thing.
$response = $this->facebook->get('/' . $pageId . '/insights?since=' . date('Y-m') . '-01', $token);
$data = $response->getGraphEdge()->asArray();
Also, is there a facebook sandbox I could use to pull dummy costs or other stats since I don't have a page that would have paid content.