Reputation: 17703
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.) 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
but m failing on that... after the successful login user is being redirected to http://projects.simriksolutions.com/serpicoclient/
How can i set the returnURL of facebook url?
Upvotes: 2
Views: 7581
Reputation: 38135
Try using an absolute URL in the redirect_uri
parameter:
PHP-SDK:
$loginUrl = $facebook->getLoginUrl(array(
'redirect_uri'=>'http://absolute_url'
));
Upvotes: 6