Hello,
we have an iframe facebookapp which worked fine till yesterday. Although we didn't change anything our app suddenly stopped working.
We could identify users_isAppUser()
as a problem. The method returns that the user has not added the app though he definitely has installed the app and is logged in. We could delete the try/catch part (see code below), so that the app does not get catched in a redirect loop, but the following methods do not work either:
$this->facebook->api_client->friends_get()
$this->facebook->api_client->friends_getAppUsers()
$this->facebook->api_client->call_method('facebook.users.hasAppPermission', array('ext_perm' => 'publish_stream'))
require_login()
does work and we can get the facebook userid of the logged in user.
The weird thing is, that our app worked fine for a couple of weeks till yesterday. Have there been any secret changes to the API in the last days? Or any other conclusions what the problem could be? I would appreciate any tips. Thanks in advance!
$this->fbuserid = $this->facebook->require_login();
// check if user has added app, exception gets thrown if the cookie has an invalid session_key i.e. user is not logged in
try {
if(!$this->facebook->api_client->users_isAppUser()) {
$this->facebook->redirect($this->facebook->get_add_url());
}
} catch (exception $ex) {
// clear cookies for application and redirect to login prompt
$this->facebook->set_user(null, null);
$this->facebook->redirect($this->configArray['appcallbackurl']);
}