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 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀