App Login
In addition to User Login, Facebook Platform support App Login using the OAuth 2.0 Client Credential flow. App Login allows you to take various administrative actions for your app, such as retrieving Insights data or approving Requests. Graph API calls that require an app access token are clearly denoted in the API reference.
You can obtain the app access token from the Graph API token endpoint athttps://graph.facebook.com/oauth/access_token by specifying your app id, app secret and client_credentials in the grant_type parameter. Both the app id and app secret are generated when your app is created in the Developer App.
https://graph.facebook.com/oauth/access_token? client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET& grant_type=client_credentials
Sending an HTTP GET request to the above URL will return an access_token in the body of the response:

You then use this access token when calling app specific parts of the Graph API (such as App Insights):
https://graph.facebook.com/YOUR_APP_ID/insights? access_token=TOKEN_FROM_ABOVE
本文介绍Facebook平台提供的AppLogin功能,该功能使用OAuth 2.0客户端凭证流程,允许应用程序执行管理操作,如检索Insights数据或审批请求。文章详细解释了如何通过指定应用ID和应用密钥获取应用访问令牌。
378

被折叠的 条评论
为什么被折叠?



