I've been including the "login with facebook" product wich allows you to get users information based on their facebook's account email.
So when I try to redirect after the users accept my app on facebook, it redirects to my homepage, not to the redirect url I specified on the getLoginUrl() method.
My code is as follows:
$fb = new Facebook([
'app_id' => "my app id",
'app_secret' => "my secret",
'default_graph_version' => 'v2.2'
]);
$helper = $fb->getRedirectLoginHelper();
$permissions = ['email'];
$loginUrl = $helper ->getLoginUrl('http://127.0.0.2/alumn-e/pages/facebookcallback/', $permissions);
$this->set('urlfacebook',$loginUrl);
These are my allowed redirection URIs:
For some reason my users are redirected to http://127.0.0.2/alumn-e/#= when they accept the conditions on the use of my app, when I was expecting to get a redirection to http://127.0.0.2/alumn-e/pages/facebookcallback/.
Ive been searching on google lots of time and I cant understand why.
Thanks everyone in advance!
EDIT: Ive included error_reporting on my function and I've done the process of logging on fb and it doesnt show anything on the console..