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

混江龙づ霸主 提交于 2019-12-05 00:17:04

问题


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?


回答1:


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.




回答2:


  1. Create a facebook app.
  2. Go to the Graph API Explorer in Facebook's Tools & Support section.
  3. Pick your app from the drop down.
  4. Hit Get Token > Get User Access Token.
  5. In Select Permissions choose required permissions or select them from extended permissions.
  6. Use the user access token that will be presented to you in the access token form input field.


来源:https://stackoverflow.com/questions/28834319/how-to-generate-facebook-marketing-api-access-token-to-use-it-in-windows-applica

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!