Can't delete photo via Facebook API?

前端 未结 3 1145
后悔当初
后悔当初 2020-12-19 11:17

Suddenly, I can\'t delete Facebook photos via the API. I get this error:

Array ( [error] => Array ( [type] => OAuthException [message] => (#3) Appli         


        
3条回答
  •  春和景丽
    2020-12-19 12:01

    I paste this comment here to someone easy to find

    "Actually apps can delete photos they created by simply calling a delete method on the resource ID. Using a curl/file_get_contents on https://graph.facebook.com/ID?method=DELETE&access_token=TOKEN where ID is the photo id and TOKEN the access token for the user-application pair. – mariomc Dec 17 '12 at 17:07"

    I tested, it worked like a charm, thank you

    $delete = file_get_contents('https://graph.facebook.com/?method=DELETE&access_token=');
    echo $delete;
    die;
    

    you can find access_token at https://developers.facebook.com/tools/access_token/, copy token can access to photo or page's photo.

提交回复
热议问题