H
H
Hootie2016-10-09 20:38:03
Facebook
Hootie, 2016-10-09 20:38:03

How do I get data from my Facebook ad account through the Marketing API?

Task: automatically collect data from the Facebook advertising account.
There is an application (facebook app) with access to an advertising account (access level = development).
Added product 'Marketing API' to the app.
App_id and secret key received access_token via

GET https://graph.facebook.com/oauth/access_token?clie...

like app_id|token.
When trying to collect insights:
GET https://graph.facebook.com/v2.8/act_%ad_account_id...

I receive
"message": "Unsupported get request.",
"type": "GraphMethodException",
"code": 100

If I specifically make mistakes in writing or in response I get the corresponding errors:
"The account is invalid"
/
"Invalid OAuth access token"

I'm obviously missing something, but I don't understand what. I would appreciate any help, thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Hootie, 2016-10-14
@Hootie

The issue was resolved.
It was necessary to use not an app token, but a user token with the necessary rights.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question