facebook/php-sdk — Issue #507: Logout Not Working - No Redirect. 
Author: kszpirak
Created: 2011-12-06 00:05:07+00:00
State: open

I am completely blown away by the fact non of the issues posted actually address the fact that the SDK is simply not working correctly when it comes to logout.

The following code provided in the tutorial doesn't work:

Facebook->logout(array('redirect'=>array('controller'=>'users','action'=>'logout'))); ?>

This codes doesn't seem to work, as the API seems to have changed to now use "next" as opposed to redirect. So the above code doesn't produce a logout button; just a link.

The following code produces a logout button, but doesn't actually redirect:

Facebook->logout(array('next'=>array('controller'=>'users','action'=>'logout'))); ?>

Has anyone gotten this to work and if so, what specifically did you do?