I implemented login and logout using facebook PHP sdk. And encountered an issue and after searched for answer and found few answers in this link and tried all of them.
Finally calling $facebook->destroySession() worked for me.
So here is how I implemented the logout for facebook.
<?php
$facebook = new Facebook(array('appId' => '1232313212....', 'secret' => '123....'));
$params = array( 'next' => 'http://..../logout.php' );
?>
<img src="fb.png" width=20 height=20 /><a href="<?php echo $facebook->getLogoutUrl($params); ?>" >Logout</a></td>
And then in logout.php file I added this code.
$facebook = new Facebook(array('appId' => '1232313212....', 'secret' => '123....'));
$facebook->destroySession();
This trick worked for me.
Blogger templates
Blogger news
Blogroll
Archives
-
▼
2013
(219)
-
▼
September
(16)
- PHP Best Practices - 1 : PHP Manual is Your Best F...
- Populate triple drop down list from database using...
- For fixing facebox loading content twice in it, af...
- Install Php on Windows
- PHP Files & I/O
- 66 PHP Script
- Send mail using php
- Demotivation script -Photo gallery script
- No title
- Control structures in Php: require_once()
- No title
- No title
- Using ltrim is not the right answer sometimes.
- Facebook PHP SDK getUser() API returns user ID ev...
- Php $_GET Variable
- PHP class
-
▼
September
(16)