Can I access the Facebook Audience Network API using a revokable token? - facebook

My company makes an ad network mediation product. We use each ad network's API to aggregate their stats on one dashboard. In order to do this for Facebook Audience Network, we currently have the developer give us their App ID and App Token, as per the Reporting API docs. As far as we can tell, though, the App Token isn't revokable, which makes some of our developers uneasy about sharing it.
Is there a way to access the Facebook Audience Network API using a revokable token, or a way to revoke an App Token?

According to the documentation at developers.facebook.com/docs/graph-api/reference/v2.1/app/… : "A user access token with read_insights permission can retrieve metrics for all apps owned by this user".
So just have the user login to your app and grant read_insights to your app.

Related

FB Ads Insights API : get the access token using credentials

I am new to FB's API
I need to use FB Ads Insights API to pull the stats and store in DB. This is my customer's requirement. Now, I have a Developer account and access to my customer's username and pwd, how can I use their credentials and get the access token to query Insights API
TIA,
Use this guide to generate an access token. You will have to create a system user that has access to your customer's account.

How do I get access to my customers account from my facebook app?

I created a facebook app (which is currently in dev stage, hence not approved by FB yet).
I need to get the daily ads insights reports for all my customers, so I need them to grant access for my app (ads_read).
I do not understand and cannot find it in the documentation, how do I get my customers to grant me (my app) access to their ads accounts.
Do I need to setup a Business Manager?
thanks
I tried using app token but it only accesses my accounts
There are two options:
Add them to your App as Test Users, so they can use the permissions without review
Go through review with the neccessary permissions
An App Token does not have any relation to a User, so you cannot even get access to your own Ads with that one. You are probably talking about a User or Page Token.
More information about Tokens: https://developers.facebook.com/docs/facebook-login/access-tokens/

How to generate Facebook Marketing API access token to use it in Windows application

I am using Facebook as advertising platform to promote my application on Apple and Google stores. I would like to make windows service which will download daily report(s) about advertising status of my marketing campaign running one Facebook, preferably using 60 day token, or some permanent solution so that token is retrieved when required. I think that i understand everything to do this except how to generate access token to use it with Facebook Graph API. Which token for which Facebook account do I need and how to obtain it?
You'll need a Facebook app and to grant that app the ads_read permission in order to retrieve reports about your advertising efforts via the API (source).
You'll want a long-lived token so that you don't have to re-authenticate very often. The access token documentation details the steps to exchange a short-lived token for a long-lived one.
You may also want to consider managing the app, ad account, and access tokens (via a business system user) with the FB Business Manager.
Create a facebook app.
Go to the Graph API Explorer in Facebook's Tools & Support section.
Pick your app from the drop down.
Hit Get Token > Get User Access Token.
In Select Permissions choose required permissions or select them from extended permissions.
Use the user access token that will be presented to you in the access token form input field.

facebook ad api access

I want to use the facebook graph api for creating custom audience.
The doc says
For an app to do ad management, a user (including an app developer) must give the app permission. This permission is called the ads_management extended permission.
Any idea how can i get the ads_management permission. Can that be applied to an account or will that need an app creation?
Please share any doc links.
Thanks
Pradeep S
The ads_management permission is available as part of the Facebook Ads API, an API on top of the Graph API that's of restricted use. To use the Ads API and thus the ads_management permission you'll need to have your app approved by Facebook as per the Ads API documentation. The form for requesting Ads API access is at https://developers.facebook.com/docs/preferredmarketingdevelopers/ads-api-access

Using App Access Token for Facebook Timeline Feeds

I have started on developing a server side application that requires integration with facebook. My needs is an access token that will not expire, but unfortunately facebook has removed the offline_access feature and replaced with a long-live user access token that will last only 60 days.
I realise that there is an Application Access Token that will not expire. When I use it instead of the User Access Token to fetch the feed, I get must less information.
I have read from other sources that as long as relevant permissions are delegated, such as read_stream is given, using the application access token should allow the server-side application to access the users information that accepted the facebook application.
Am I mistaken ? Can anyone help to clarify ? Thanks
Thanks
Excerpt from: https://developers.facebook.com/docs/opengraph/using-app-tokens/
While an App Access Token is largely for the purposes of publishing information back to Facebook on behalf of the user, there is a limited set of information that can be retrieved from Facebook using an App Access Token.
Basic Profile Info of a User (ID, Name, Username, Gender)
A User’s Friends and their IDs
Permissions granted by the User to your App
So there is a limited set of info you can get using an app access token. So you probably don't want to use it to get the user's feed.