[英]Facebook: get app access token using getAccessToken method
On facebook documentation page, there is written: 在facebook 文档页面上,写着:
Facebook::getAccessToken() 面子书:: getAccessToken()
Get the current access token being used by the SDK. 获取SDK使用的当前访问令牌。 This may be a user access token or an application access token.
这可以是用户访问令牌或应用程序访问令牌。 See the permissions page for more information on access tokens.
有关访问令牌的更多信息,请参见权限页面。
But there is no explanation how to force the method to return app token, not the user token. 但是没有说明如何强制该方法返回应用程序令牌,而不是用户令牌。 It is not exmplained nor on permission page.
既没有示例,也没有在权限页面上。 Cn anybody help, how this method works?
cn有人帮助,这种方法如何工作?
The App access_token is usually just APP_ID|APP_SECRET
. 应用程序access_token通常只是
APP_ID|APP_SECRET
。 In my code, I tend to just do this: 在我的代码中,我倾向于这样做:
$app_token = APP_ID . '|' . APP_SECRET;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.