Facebook PHP API - users_isAppUser ile ani sorunu ()

0 Cevap php

Biz düne kadar iyi çalıştı bir iframe facebookapp var. Biz bir şey değişmedi rağmen bizim app aniden çalışmayı durdurdu.

Biz users_isAppUser() bir sorun olarak tanımlamak olabilir. Yöntem, kesinlikle app yüklü ve Biz try / catch kısmını (bkz. aşağıdaki kodu), app bir yönlendirme döngü catched almaz böylece silmek olabilir oturum olsa kullanıcı uygulama ekledim olmadığını döndürür ama aşağıdaki yöntemler işe ya da yok:

$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() iş yapar ve biz kullanıcı oturum açmış facebook kimliği alabilirsiniz.

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']);
}

0 Cevap