Grynets
Grynets

Reputation: 2525

Facebook access_token for ads

I have ad campaign and want to receive stats for it with this facebook tutorial.
But everywhere I see access_token required. And I don't understand where I can find it for me as developer for ad.
I've used this for user access token, and I see there app token and page token. But no access token for ad.
So my questions:
1. Is it possible to get data from ad campaign as developer?
2. How can I generate access_token for developer for ad?

Upvotes: 2

Views: 150

Answers (1)

Mike S
Mike S

Reputation: 1646

These are the steps you need to follow to get started:

  1. Visit https://developers.facebook.com and create your app if you haven't already
  2. Visit the Marketing API > Tools page (put your APP ID in): https://developers.facebook.com/apps/<YOUR_APP_ID>/marketing-api/tools/

  3. Create a sandbox ad account and generate a sandbox token to test with (see screenshot: https://i.sstatic.net/JOyMF.jpg)

Once you're ready to go live you'll need to then:

  1. Visit the Marketing API > Settings page (put your APP ID in): https://developers.facebook.com/apps/<YOUR_APP_ID>/marketing-api/settings/

  2. Link your ad account

  3. Go back to the Marketing API > Tools page and generate a real access token

Upvotes: 3

Related Questions