My facebook app sends out requests to some users who have not yet added the app themselves. When they accept the request, I am trying to delete it. At this moment, they have already (automatically) added the app and authorized it to use their information and so on.
I am trying to delete the request exactly like it is described in the documentation:
if(isset($_REQUEST['request_ids'])) {
$reqs = explode(',', $_REQUEST['request_ids']);
foreach($reqs as $r) {
$full_req_id = $r . '_' . $this->_currentfbuser->getId();
$delete_success = $this->_facebook->api("/" . $full_req_id,'DELETE');
}
}
I double-checked that $full_req_id really is request-id_user-id, but I am still getting this error:
Message: (#200) The entity backed by id ... cannot be seen by the current viewer (EntID: ...)
Why is it forbidden for my app to delete the request? Shouldn’t it always be allowed to delete requests sent by the same app?
I solved it using this snippet. (I thought, the Facebook SDK would be doing roughly the same internally, but anyways)