So, I’m working a Rails app and everything is going smoothly. I installed Facebooker (the plugin to interface with Facebook Connect) and got it integrated with my app’s user authentication in almost no time—perfect. But somehow between rails app and installing Facebooker, all of my stylesheet and javascript links broke (using, of course, the default javascript_include_tag and stylesheet_link_tag). The links now had a mysterious double slash after the host name (i.e., domain.tld//stylesheets/scaffold.css; domain.tld//javascripts/application.js). Truly odd. After scouring the internet and talking to some friends, no one could proffer any information on how to fix the issue. Evan and I spent a lot of frustration over this. Even stranger: the link tags worked as expected on the server in production and were only broken in development.
I stepped away from it and after a serious inspiration session from my muse, I solved the issue in five minutes. Seriously, it’s quite simple: in config/facebooker.yml, be sure that your callback_url does not have a trailing slash—in any environment. That’s it, problem solved.
I just spent an hour trying to track down this issue. There are even 2 unanswered questions regarding this on StackOverflow.
Thanks for the help and preventing my insanity :)
For sure. Glad I could help someone else out.
I am having a similar issue, the post authorize redirect url in the new facebook forces you to use a trailing slash, now after every time a user tries to authorize the app theyre being redirected to a url with two slashes after the redirect url. I do not have a trailing slash on my callback url in my facebooker.yml file. I haven’t seen any solutions to this thus far. Anyone run into this problem?
Great catch! This had the potential to be a solid time waster for me, but this got the issue resolved quickly! Awesome!
I figured my double slash issue out if anyone was having a problem similar to what i listed below. The problem was that apparently with the new facebook you cant add a redirect url in the settings, just leave it blank. Also, sometimes the new settings -do- take a few minutes to take effect. Hope this helps, somebody…
Thanks for posting this.
Thanks! Works like a charm
Man, you helped me out. Thank you.