致命错误:未捕获的OAuthException:(#200)需要扩展权限:在1033行的/home/a1607618/public_html/base_facebook.php中抛出了read_stream

我的应用倾向于阅读用户留言

if ($user)
{
    $comments = $facebook->api('/me/home');
    d($comments);
}

function d($d){
    echo '<pre>';
    foreach ($d as $a => $b)
    {
        print "$a: $b\n";
    }
    echo '</pre>';
}

我授予我的应用程序扩展权限:通过Apps_ > connectme _> Permissions读取

这是1033行

protected function throwAPIException($result) {
    $e = new FacebookApiException($result);
    switch ($e->getType()) {
        // OAuth 2.0 Draft 00 style
        case 'OAuthException':
        // OAuth 2.0 Draft 10 style
        case 'invalid_token':
        $message = $e->getMessage();
        if ((strpos($message, 'Error validating access token') !== false) ||
           (strpos($message, 'Invalid OAuth access token') !== false)) {
            $this->setAccessToken(null);
            $this->user = 0;
            $this->clearAllPersistentData();
        }
    }

    throw $e;
}

  ask by TheSniper104 translate from so

本文未有回复,本站智能推荐: