You Are Here Home > Fatal error: Call to undefined method...
DirectorySync is a directory synchronizing and backup utility providing automated, real-time syncing and scheduled, configurable backups at an affordable price.

Fatal error: Call to undefined method FacebookRestClient::users_isAppAdded() – Updating An Old Facebook Application

If you get this error message after updating your Facebook library files:

Fatal error: Call to undefined method FacebookRestClient::users_isAppAdded()

Try changing this code:

<?php
/* ... */
       try {
	  if (!$facebook->api_client->users_isAppAdded()) {
	  		$facebook->redirect($facebook->get_add_url());
	  }
	} catch (Exception $ex) {
	  //this will clear cookies for your application and redirect them to a login prompt
	  $facebook->set_user(null, null);
	  $facebook->redirect($appcallbackurl);
	}
/* ... */
?>

With this:

<?php
/* ... */
       try {
	  if (!$facebook->api_client->users_isAppUser()) {
	  		$facebook->redirect($facebook->get_add_url());
	  }
	} catch (Exception $ex) {
	  //this will clear cookies for your application and redirect them to a login prompt
	  $facebook->set_user(null, null);
	  $facebook->redirect($appcallbackurl);
	}
/* ... */
?>

Use this at your own risk, it seems to fix the problem and I’m hoping it won’t introduce bugs in other places…

Fatal error: Call to undefined method FacebookRestClient::users_isAppAdded() – Updating An Old Facebook Application
Filed under: General   Posted by: Codehead
Do you have any questions? ask here.




2 Comments »

  1.  

    Works like a charm!!

    Comment

  2.  

    if you were around, i wud like to kiss you….coz it works for me after hours of digging… :)

    Comment

RSS feed for comments on this post. TrackBack URL

Leave a comment