简体   繁体   中英

Error:#200 The user hasn't authorized the application to perform this action

Facebook Login URL Code :

$this->set("facebookUrl",$this->facebook->getLoginUrl(
                array(
                        'scope' => 'email,publish_actions',
                        'redirect_uri' =>"http://redirected_url"
                        'display'=>"popup"
                )
        ));

Post story on facebook code :

$params = array(
                "access_token" => "access_token_of_logged_in_user", 
                "message" => "Testing facebook post",
                "picture" => "http://i.stack.imgur.com/Og6yH.jpg?s=128&g=1",
                "caption" => "www.pontikis.net",
                "description" => "Description of post."
                    );

$myProfile  =   $this->facebook->api('/me');
$permissions = $this->facebook->api('/me/permissions');
pr($permissions);
try {
    $ret = $this->facebook->api('/'.$myProfile['id'].'/feed', 'POST', $params);
    echo 'Successfully posted to Facebook';
    } 
catch(Exception $e) {
   echo $e->getMessage();
}

Permission Displayed here :

Array
(
    [data] => Array
        (
            [0] => Array
                (
                    [permission] => public_profile
                    [status] => granted
                )

            [1] => Array
                (
                    [permission] => email
                    [status] => granted
                )

        )

)

I got following Error when I post on facebook :

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

If you're using Graph API >=v2.0, then you need to pass Login Review for non admin/tester/developer users before you can use this permission in your app:

See

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