[英]Uncaught OAuthException: (#200) User cannot access this application only when uploading photos to facebook
Friends, 朋友们
I am working with FB SDK using PhP and everything is working fine except one case. 我正在使用PhP使用FB SDK,除一种情况外,其他所有功能都工作正常。 I am able to post messages, links etc to FB from my app using the below code. 我可以使用以下代码从我的应用程序向FB发布消息,链接等。
$fb->api('me/feed','POST', array('access_token' => ACCESS_TOKEN, 'message' => 'hello world!'));
When trying to post an image using the below code, it throws Uncaught OAuthException: (#200) User cannot access this application 尝试使用以下代码发布图像时,它将引发Uncaught OAuthException:(#200)用户无法访问此应用程序
$fb->api('/'.$GROUP_ID.'/photos?access_token='. $facebook->getAccessToken(), 'POST',
array(
'source' => '@' . $img,
'message' => 'This photo came from my app.'
)
Any ideas on why this could happen? 为什么会发生这种情况有什么想法? I have searched almost all possible solutions in StackOverflow and search engines, but nothing works. 我已经在StackOverflow和搜索引擎中搜索了几乎所有可能的解决方案,但是没有任何效果。
FYI, I am making the Login URL using below code - 仅供参考,我使用以下代码制作登录网址-
$loginUrl = $fb->getLoginUrl(array(
'scope' => 'publish_stream user_groups publish_actions',
'redirect_uri' => $site_url,
));
Also, the App has all required extended permissions setup in FB. 此外,该应用程序在FB中具有所有必需的扩展权限设置。
Any help will be appreciated. 任何帮助将不胜感激。 Thanks in advance! 提前致谢!
插入“ $ fb-> api('/'.$ GROUP_ID。'/ photos?”可使用“ $ fb-> api('/'.$ ALBUM_ID。'/ photos?”,即使用任何现有相册ID或不要提及任何专辑ID,在第二种情况下,它将为您的应用创建一个新专辑
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.