Facebook Error (#200) The user hasn't authorized the application to perform this action (PHP)

∥☆過路亽.° 提交于 2020-01-03 03:21:11

问题


I am posting on facebook profile, pages and groups using my webapp.since morning it showing error "Exception occured, code: 200 with message: (#200) The user hasn't authorized the application to perform this action". I added all permissions required for posting.

 $loginUrl = $helper->getLoginUrl( ["public_profile", "user_groups","publish_actions","email","user_location","user_photos",    "user_likes","manage_pages","user_birthday","user_status","read_stream"] );

$requestPage = new FacebookRequest($session, 'GET', 'post_on_page_id?fields=access_token');
                        $responsePage = $requestPage->execute();
                        $resultPage = $responsePage->getGraphObject()->asArray();
                        $pageToken = $resultPage['access_token'];
                        $facebookSession = new FacebookSession($pageToken);
                        $response = (new FacebookRequest( $facebookSession, 'POST', 'post_on_page_id/photos',array('source' => new CURLFile("$userPhoto", 'image/png'),'message' => "$message")))->execute()->getGraphObject();
                        $page_post_id=$response->getProperty('id');

And one more problem is that my app fetching profile, all groups and pages. It's showing connected profile image, group cover image and page profile image in chrome, but not in other browsers and operating systems.

My app url is http://picstun.com/socialsharing/


回答1:


looks like you are only requesting permission for: My public profile and email address.



来源:https://stackoverflow.com/questions/29471015/facebook-error-200-the-user-hasnt-authorized-the-application-to-perform-this

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!