Jump to:

10841 Posts in 2512 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » willrossi's Facebook Connect - keeps refreshing after login?

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2297 Views
  • nimeso
    Avatar
    Community Member
    17 Posts

    willrossi's Facebook Connect - keeps refreshing after login? Link to this post

    Hi all,

    Firstly thanks for all the great work Will!

    I've successfully installed the latest version of your module and latest Silverstripe on my computer at work and have just set it up at home and am getting the most annoying issue!

    1. The FB 'login' button works fine and opens the login window a-ok.
    2. Once I've logged in it closes the pop up but then keeps repeating the

    window.fbAsyncInit = function() {
    FB.init({
          appId : '159716150722805',
          session : null,
          status : true,
          cookie : true,
          xfbml : true
    });

       FB.Event.subscribe('auth.login', function() {
          window.location.reload();
       });
    };

    function and continuously trys to reload the page.... endless loop?

    I've now tried two clean installs on my local host and tried a heap of stuff to get it sorted but have had no luck at all. kinda important I get this working or my boss is gonna skin me on Monday! lol

    Cheers for all your help Will

    Jamie

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: willrossi's Facebook Connect - keeps refreshing after login? Link to this post

    Session shouldn't be null after logging in. You might want to put a debug statement inside the catch() statement to see any of the errors its generating.

    Note that the app url is a setting on the facebook settings page and that has to match the URL so if you're on a different URL at home that would cause it to fail.

  • nimeso
    Avatar
    Community Member
    17 Posts

    Re: willrossi's Facebook Connect - keeps refreshing after login? Link to this post

    Will, you are a true angle I owe you a beer (and take some time off... it's sat!).
    Thanks you heaps for pointing me in the right direction. should have spotted that. I'll let you know how I get on.

  • Capt. Morgan
    Avatar
    Community Member
    30 Posts

    Re: willrossi's Facebook Connect - keeps refreshing after login? Link to this post

    I'm curious though how you set the Application URL in the settings when you're testing your implementation locally. http://localhost?
    Doesn't seem to do it for me, then I get the endless refresh as nimeso told about. Leaving it black will cause the auth popup to protest..

    [Solved]
    I'm running my app locally on port 2000 so I of course just had to set "http://localhost:2000/" as my site URL and the eternal redirect loop stopped.

    Now I just have to figure out why my session won't work..

    2297 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.