如何获取app access_token(针对这样的错误This method must be called with an app access_token.)
2011-09-23 14:27
603 查看
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. GraphAPI 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 at
https://graph.facebook.com/oauth/access_tokenby 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-在使用图谱API访问App数据提示“This method must be called with an app access_token.”
- "There is already an open DataReader associated with this Command which must be closed first"错误
- There is already an open DataReader associated with this Command which must be closed first的错误解决办法
- 提交时提示错误This Bundle is invalid.New apps and app updates submitted to the App Store must be built with
- C#数据库操作错误:There is already an open DataReader associated with this Connection which must be closed..
- 一例发生在cshtml页面中的There is already an open DataReader associated with this Command which must be closed
- LINQ链接数据库出错(There is already an open DataReader associated with this Command which must be closed first )
- There is already an open DataReader associated with this Connection which must be closed first
- There is already an open DataReader associated with this Connection which must be closed first
- TypeError: unbound method x must be called with x instance as first argument (got nothing instead)
- this bundle is invalid . new apps and app updates submitted to the app store must be built with publ
- 如何忽略Android资源编译错误 Error: this attribute must be localized.
- There is already an open DataReader associated with this Command which must be closed first." exception in Entity Framework
- 提交时提示错误This Bundle is invalid.New apps and app updates submitted to the App Store must be built wit
- LINQ: There is already an open DataReader associated with this Command which must be closed first
- TypeError: unbound method a() must be called with A instance as first argument (got nothing instead)
- 关于MultipleActiveResultSets属性导致的There is already an open DataReader associated with this Command which must be closed first的解决方法
- Data is Null. This method or property cannot be called on Null values.错误分析
- 提交时提示错误This Bundle is invalid.New apps and app updates submitted to the App Store must be built wit
- First token must be SYMBOLSET, this doesn't look like a symbol file错误的解决