doushui3061 2017-04-06 10:26
浏览 93
已采纳

Facebook重定向URI登录产品

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:

enter image description here

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..

  • 写回答

1条回答 默认 最新

  • dtt27783 2017-04-10 17:28
    关注

    I discovered this was a mistake on my facebook callback function so thanks to everyone! I finally understood this and I used v2.8 finally.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 对于这个复杂问题的解释说明
  • ¥50 三种调度算法报错 采用的你的方案
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败