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 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测