The above answer Piskvor did this for me. Its crazy how many hours I spent trying to figure it out.
The main problem with plugins like Facebook for CakePHP is that they do not come with updates. APIs, especially popular ones like Facebook, are constantly changing because they are very important. If the guy who wrote it first as a hobby moves with his life and stops updating the SDK, people who are less aware of how to change these things get stuck.
WORKING CODE:
However, thanks for the excellent Piskvor solution, here is my piece of code for
apps/plugins/facebook/views/helpers/facebook.php $init .= $this->Html->scriptBlock( <<<JS window.fbAsyncInit = function() { FB.init({ appId : '{$appId}', session : {$session},
The key element of the code is:
FB.Event.subscribe("auth.logout", function() { window.location = '/users/logout' }); {$callback}
user1052933
source share