I’m using facebook function to delete an invite from notifications and application page tab after the invite is accepted but it is giving me a error.
function build_full_request_id($request_id, $user_id) {
echo $request_id . '_' . $user_id;
}
foreach ($request_ids as $request_id)
{
("reqeust_id=".$request_id."<br>");
$full_request_id = build_full_request_id($request_id, $user_id);
("full_request_id=".$full_request_id."<br>");
try {
$delete_success = $facebook->api("/$full_request_id",'DELETE');
if ($delete_success) {
echo "Successfully deleted " . $full_request_id;}
else {
echo "Delete failed".$full_request_id;}
}
catch (FacebookApiException $e) {
"error";}
}
This is the error,i get Call to a member function api() on a non-object in
wow, you have so many errors in your “code” i wonder that it only fails with the non-object error. try this one: