Reputation: 113
As of version 3.0 the App Insights API is deprecated.
Unfortunately I rely heavily on the app_event node to fetch information about the revenue. The code for that looks like this:
requests.request(
"GET",
"https://graph.facebook.com/v2.12/" + str(app_id) + "/app_insights/app_event/",
params={
"since":d1.strftime("%s"),
"until":d2.strftime("%s"),
"summary":"true",
"event_name":"fb_ad_network_revenue",
"aggregateBy": "SUM",
"breakdowns[0]":"placement",
"access_token": app_access_token
}
)
For new Apps I can't use this code anymore because the Graph API does not support it anymore:
The app tried to call version v2.12. This app can only call versions v3.0 and higher, so the request defaulted to version v3.0.
How could I possibly port my code to version 3.0?
Upvotes: 1
Views: 377
Reputation: 292
I ran into this problem as well. It looks like you can use the adnetworkanalytics endpoint now for this query. The parameters and data returned are of course slightly different than the app_event endpoint. Hurray for progress I guess.
Here are the docs: https://developers.facebook.com/docs/audience-network/reporting-api
Upvotes: 1