Facebook fb-login not redirecting back

房东的猫 提交于 2020-01-06 12:54:31

问题


I want to authenticate the user using facebook login credentials. Everything works, except for the fact that it does not redirect to the redirect_uri specified which I require to capture the signed_request. Any help is hugely appreciated.

Below is what I have

#fb-root
%script{:src => "http://connect.facebook.net/en_US/all.js"}
:javascript
  FB.init({
    appId:'my_client_id_from_the_app_i_created', cookie:true,
    status:true, xfbml:true
  });
%fb:login-button{:perms => "publish_stream", :redirect_uri => "#{facebook_signin_url}"}
  Login using your facebook account.

回答1:


You might need to use:

http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/

Also, I'm not familiar with Ruby-on-Rails, but

where do you get facebook_signin_url?

and what is the # in the redirect_uri?



来源:https://stackoverflow.com/questions/5566545/facebook-fb-login-not-redirecting-back

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!