CakePHP-Facebook-Plugin icon indicating copy to clipboard operation
CakePHP-Facebook-Plugin copied to clipboard

any kind of "redirect" cannot use in function options

Open nguyenanhthai opened this issue 13 years ago • 1 comments

I have a issue when I uses the plugin, I cannot use "redirect" in Helper Facebook::login() and logout(). I also can not use function afterFacebookLogin() to redirect, the app will only redirect only if I refresh the page.

Example when my code in view is:

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

===> my logout button disappears.

when I debug(Router::url($options['redirect']));

this show the wrong url. May be any wrong when I config?

Any Suggestion for me?

nguyenanhthai avatar Jul 05 '12 08:07 nguyenanhthai

try this way:

Facebook->logout(array('redirect' => 'logout'', 'label' => 'Logout')); ?>

if you want to put an image instead text try this way

Facebook->logout(array('redirect' => 'logout'', 'label' => 'Logout', 'img' => 'connectwithfacebook.gif')); ?>

jeffersonrbr avatar Aug 21 '12 04:08 jeffersonrbr