简体   繁体   中英

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

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/

看来您只要求获得以下权限:我的公开个人资料和电子邮件地址。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM