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, '/', '');

I got it from this link

Hope it help someone.

Monday, August 22, 2011

Addthis and ajax response page

There are lots of post regarding Addthis api usage for AJAX page. But none of the post worked perfectly for me. However i got some idea from all that posts to implement it. Here is my code, made little changes from different post.

var addthisScript = "";/>

function initAddthis(){
if (window.addthis){
window.addthis.ost = 0;

When you load page using ajax for example (here i have used jQuery)
if(window.addthis != undefined) {
  delete window.addthis;
$.getScript( addthisScript , function(){
Please let me know, does it work for you.