Removing Facebook application through API

前端 未结 5 1713
故里飘歌
故里飘歌 2020-12-29 14:38

I have a web app that adds an application to a users profile, and requests extended permissions.

I can\'t seem to find if there is a way to use a script to remove th

5条回答
  •  梦谈多话
    2020-12-29 15:04

    I have a PHP example if anyone is interested (with Graph v5 in 2017):

    # v5 with default access token fallback
    $fb = new Facebook\Facebook([/* . . . */]);
    
    $fb->setDefaultAccessToken('{access-token}');
    
    # These will fall back to the default access token
    $response = $fb->get('/me');
    $response = $fb->post('/me/feed', $data);
    $response = $fb->delete('/123', $data);
    

    So you would have to use:

    $response = $fb->delete('/123', $data);
    

    Instead of using the FacebookRequest class in v4.

提交回复
热议问题