如何设置Facebook返回URL [英] how to set facebook return url

查看:242
本文介绍了如何设置Facebook返回URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在我的网站上启用Facebook登录.对于我的解决方案,我遵循以下步骤:
1.)登陆网站: http://projects.simriksolutions.com/serpicoclient/kool_test.php
2.)当用户单击登录" 时,我们将显示登录页面: http://projects.simriksolutions.com/serpicoclient/kool_test.php?section=userLogin 通过Facebook和我网站的表单登录

I have been trying to enable facebook login in my website. For my solution, i followed the following steps:
1.) Landing on website: http://projects.simriksolutions.com/serpicoclient/kool_test.php
2.) When user clicks on "login", then we show up login page: http://projects.simriksolutions.com/serpicoclient/kool_test.php?section=userLogin with login via facebook and my site's form

3.)用户使用通过Facebook按钮登录,并使用在Facebook网站中使用Facebook凭据登录.

3.) Users uses the login via facebook button and logins using facebook credentials in facebook website.

到目前为止,还不错...之后,用户应返回到其他页面,即:

Up to here its fine... After that the user should return to some other page, i.e: http://projects.simriksolutions.com/serpicoclient/kool_test.php?section=makeFBLogin&returnURL=/serpicoclient/kool_test.php

但是在那方面失败...成功登录用户被重定向到 http://projects之后. simriksolutions.com/serpicoclient/

but m failing on that... after the successful login user is being redirected to http://projects.simriksolutions.com/serpicoclient/

如何设置Facebook网址的returnURL?

How can i set the returnURL of facebook url?

推荐答案

尝试在redirect_uri参数中使用绝对URL:
PHP-SDK :

Try using an absolute URL in the redirect_uri parameter:
PHP-SDK:

$loginUrl = $facebook->getLoginUrl(array(
    'redirect_uri'=>'http://absolute_url'
));

这篇关于如何设置Facebook返回URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆