Showing posts with label facebook. Show all posts
Showing posts with label facebook. Show all posts

Saturday, August 27, 2011

Facebook logout problem php solved

After two days of searching, i have found a problem solved link and i wanted to share it with you all. Put this line in your logout script before redirect to Facebook logout.

$session = $this->facebook->getSession();
$logoutUrl = $this->facebook->getLogoutUrl(array('next' => base_url(), 'session_key' => $session['session_key']));
setcookie('fbs_'.$this->facebook->getAppId(), '', time()-100, '/', '.domain.com');
$this->session->sess_destroy();
redirect($logoutUrl);

I got it from this link http://forum.developers.facebook.net/viewtopic.php?id=71219.

Hope it help someone.

Friday, June 10, 2011

Facebook login or permission page redirect loop

After 2 days of my head aching, i am able to find the problem of facebook login or permission infinite loop.

Actually the problem occurs when the facebook graph api ("makeRequest" function in base_facebook.php) make a curl request to https url then curl try to verify the ssl certificate and it returns false (specially in my case). So for quick fix, i have add

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

just after curl_init. Hope it helps you. As it works for me.

Let me know if it works for you.

Cheers