delete facebook requests via graph api

2019-09-09 10:54发布

I am getting latest apprequest like this:

FB.api('/me/apprequests', function(response){

if (response.data[0]) {     
// code here
};

How to delete apprequest using the same graph api method , I know this is possible with request containing access_token ... but in this case I am caching html and didn't know how

Thanks

1条回答
地球回转人心会变
2楼-- · 2019-09-09 11:19

Please use the following code (PHP):

file_get_contents('https://graph.facebook.com/'.$rid.'?access_token='.$token.'&method=DELETE') == "true";   

// $rid: Request Id
// $token: Access Token

// The response is generally just the text "true" 
查看更多
登录 后发表回答