使用Facebook
PHP SDK,当我尝试发布状态更新时,我收到以下错误:
原文链接:https://www.f2er.com/php/135229.htmlFatal error: Uncaught OAuthException:
(#200) The user hasn’t authorized the
application to perform this action
这些是我采取的步骤:
https://graph.facebook.com/oauth/authorize?client_id=FB_APP_ID&redirect_uri=REDIRECT_URI
>获取访问令牌:
https://graph.facebook.com/oauth/access_token?client_id=FB_APP_ID&code=CODE&client_secret= FB_SECRET&redirect_uri=REDIRECT_URI
>尝试更新状态:
require_once(facebook.PHP); $fb = new Facebook(array( 'appId' => FB_APP_ID,'secret' => FB_SECRET )); $post = $fb->api('me/Feed','POST',array( 'access_token' => ACCESS_TOKEN,'message' => 'hello world!' ));
我没有看到我的应用程序中的任何设置授权应用程序执行此操作,但也许我错过了一些东西.有什么建议?