简体   繁体   English

取消与应用程序Facebook的令牌链接

[英]Unlink token from app facebook

    $fb = new Facebook([
        'app_id' => $this->app_id,
        'app_secret' => $this->app_secret,
        'default_graph_version' => 'v2.3'
    ]);
    $id = $fb->get("/me",$fbtoken)->getDecodedBody()["id"];

    print_r($fbtoken);
        $response = $fb->post(
        '/'.$id.'/permissions', array("delete"),
        $fbtoken
    );
    print_r($response);

I am trying to post \\DELETE /{user-id}/permissions?access_token={APP-ACCESS-TOKEN} but its not working. 我正在尝试发布\\DELETE /{user-id}/permissions?access_token={APP-ACCESS-TOKEN}但无法正常工作。

$response = $fb->delete('/me/permissions',array(),$fbtoken);

worked. 工作了。 I was trying to post http delete request, while it already had delete() method 我正在尝试发布http delete请求,而该请求已经具有delete()方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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