Facebook redirect after login not working when url is dynamic
- by dythffvrb
This is my code:
$loginUrl = $facebook->getLoginUrl(array(
'scope' => 'publish_actions',
'redirect_uri' => 'http://mysite.com/',
));
It works but if I remove redirect_uri it doesn't work anymore.
$loginUrl = $facebook->getLoginUrl(array(
'scope' => 'publish_actions'
));
According to Facebook domcumentation redirect_uri is optional.
https://developers.facebook.com/docs/reference/php/facebook-getLoginUrl/
Im trying to redirect the users to the same url they were on before logging in.
Update: This problem occurs when the url is mysite.com/post23 but when url is mysite.com/staticpage or mysite.com there are no problems
Any workarounds?
EDIT: It looks like a bug, it doesn't work with certain url in the same site
I wil try and report it to Facebook.