简体   繁体   中英

Symfony 2 and facebook login error

I am using fos_facebook bundle to integrate facebook login system with my web app. I am getting following error.

"The Facebook user could not be retrieved from the session"

Has anyone come across this problem? Could anyone successfully integrate facebook with symfony? Please provide your configuration and userInterface class.

You have to give the browser a little time to handle the Facebook cookie.

<script>
   function goLogIn(){
       window.location = "{{ path('_security_check') }}";
   }

   function onFbInit() {
       if (typeof(FB) != 'undefined' && FB != null ) {
           FB.Event.subscribe('auth.statusChange', function(response) {
              setTimeout(goLogIn, 500);
           });
       }
   }
</script>

this is a snip from the FOSFacebookBundle documentation. Where the proces is described :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM