1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Facebook integration - help wanted!

Discussion in 'Troubleshooting and Problems' started by SchmitzIT, Jun 5, 2013.

  1. SchmitzIT

    SchmitzIT Well-Known Member

    Would someone please be able to check something for me?

    I've been working for a client on getting the FB integration to work. While it had some issues initially (in IE, instead of properly returning to XF, it just kept refreshing), resetting the secret key solved that issue.

    My client still seems to have issues, but for me FB integration now works flawlessly, on FireFox, Chrome, and even IE.

    What I'm hoping to see is whether others experience any issues with FB login on the site, so I'm hoping some of you might not mind doing a quick check for me. Here's what I'd need:

    1. Head on over to globaldiscussionforum.tv, and sign in using Facebook integration.
    2. Once logged in, try and click the link in the black notification in the lower right corner inviting you to introduce yourself.
    3. You're done. Please let us know whether you experienced any issues with the above, and which browser you used?

    All accounts created will be wiped before launching the site. I just want to verify whether the issue can be reproduced by someone else.

    We're either looking for a refresh/login loop, or somehow ending up getting logged out either instantly, or after clicking the link in the notification.

    Thanks in advance :)

    Peter
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    I've already explained this to the guy.

    It's quite simple:

    upload_2013-6-5_19-54-20.png

    The board URL in admin CP is www. and he's using non-www when browsing the site.

    Exactly the same reason I told him when he was blaming my Notifications add-on for "not working properly with facebook"
     
  3. SchmitzIT

    SchmitzIT Well-Known Member

    I did use your comment to fix the issue last time, and then I think it indeed was different in FB than in the Admin CP. I took care this time to ensure both are using www. In the notification, I also parsed the URLs with www.

    What do you mean "using non-www" when browsing, exactly?

    Oh, and off-topic, Chris, I sent you a PM ;-)
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    His board URL in the admin CP must be set up as http://www.globaldiscussionforum.tv/ because that is the URL that Facebook redirects to.

    I can exactly replicate the issue you describe - and presumably what your client is experiencing - if I use http://globaldiscussionforum.tv/ (with no www.).

    You should get your client to decide what his URL is. Is it http://www.globaldiscussionforum.tv/ or is it http://globaldiscussionforum.tv/

    Once that is decided, put that URL into Admin CP > Options > Basic Board Information > Board URL.

    Once that's done, make sure Facebook is configured with the same URL.

    Finally set up a redirection from the wrong URL to the right URL in htaccess.

    I know you know these steps, but it's more for the benefit of your client's understanding and anyone else who may find this. You will always get unpredictable results if you browse the site on even a slight variation of the real URL configured in the Admin CP.
     
    Clovis likes this.
  5. SchmitzIT

    SchmitzIT Well-Known Member

    The admin cp option for board url is the address with the www.

    But interesting. I always just used the regular URLs, and have not been able to reproduce the error. Theoretically, shouldn't that mean that unless someone explicitly removes the www, the issue should not occur?

    I can of course use htaccess rules, but am curious how many people this might affect?
     
  6. Tracy Perry

    Tracy Perry Well-Known Member

    Tried it and posted a message... Don't forget to purge the user base. :coffee:
     
  7. Chris D

    Chris D XenForo Developer Staff Member

    I can reproduce it every time:

    http://globaldiscussionforum.tv/register/facebook?reg=1 -- After Facebook login, page refreshes, not logged in.
    http://www.globaldiscussionforum.tv/register/facebook?reg=1 -- After Facebook login, page refreshes and logged in to forum.


    Yeah it should only be a problem if someone manually types the address without the www.

    But also, with there being no redirection between the two, you can't guarantee the one without www. won't end up in Google:

    https://www.google.co.uk/search?q=g...53,d.d2k&fp=9a303c08cdeb5d94&biw=1280&bih=590

    :)

    Best bet is to set up the redirection in htaccess. There's some posts on the forum here on how to do it. That work great. Doesn't affect anything. And it always guarantees you only have one copy of your content in Google.
     
    SchmitzIT and Tracy Perry like this.
  8. Tracy Perry

    Tracy Perry Well-Known Member

    And if using nginx, it's a simple matter of putting near the top of the host configuration
    Code:
    server {
        listen 80;
        server_name www.twowheeldemon.com;
        return 301 http://twowheeldemon.com$uri;
    }
     
    Last edited: Jun 5, 2013
    SchmitzIT likes this.
  9. Tracy Perry

    Tracy Perry Well-Known Member

    One thing I noticed is I was logged in at the www address. Went to look at the site without the www address and it wanted me to log in as a user again... NOT NICE & FRIENDLY. Enable the URL rewrites and have him/her decide do they want it to show as WWW.xxx.xxx or xxx.xxx. The way it is set now is not the most "precise" in configuring a web server... unless they want to redirect the non WWW traffic to a "Hey Dummy - put in WWW before the address" type page.
     
  10. SchmitzIT

    SchmitzIT Well-Known Member

    Just to confirm then.

    This is not an issue due to how the XenForo and/or Facebook integration has been set up, but rather a web server configuration issue?

    Update: Reason I ask is that in my opinion, I configured everything the correct way using the guidelines provided.
     
  11. Brogan

    Brogan XenForo Moderator Staff Member

    Yes.

    In conjunction with ensuring the correct URLs are used in the various fields.
     
    SchmitzIT and Chris D like this.
  12. Chris D

    Chris D XenForo Developer Staff Member

    Exactly.

    The site is available from two different URLs. It should only ever be available from one. This is true regardless of what software you're using.
     
    SchmitzIT likes this.
  13. SchmitzIT

    SchmitzIT Well-Known Member

    Cheers.
     
  14. SchmitzIT

    SchmitzIT Well-Known Member

    The various fields being the FB app callback URL and the XF Options -> Board URL, correct?
     
  15. Chris D

    Chris D XenForo Developer Staff Member

    Yep.
     
    SchmitzIT likes this.
  16. SchmitzIT

    SchmitzIT Well-Known Member

    Thanks, Chris :)
     
  17. SchmitzIT

    SchmitzIT Well-Known Member

    Thanks for your assistance everyone. It was indeed solved with a redirect to turn non-www traffic tot www-traffic.
     
    Chris D and Tracy Perry like this.

Share This Page