Announcement Announcement Module
Collapse
No announcement yet.
Spring Social Quickstart Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Social Quickstart

    I am working on something that requires you to log in through Facebook. I am unfamiliar with the Spring Framework so I have been looking at the Spring Social Quickstart code which gives the code that allows your web service to log in through Facebook. Launching this through my desktops web browser works flawlessly. Upon trying to connect through my android phone I keep getting this error. "Given URL is not allowed by the Application Configuration.: One or more of the URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains" Is there a way to fix this error so I can log in through my mobile web browser?

  • #2
    Whatever URL Facebook redirects to after authorization *must* be based on the Site URL as configured at Facebook. If you're using the same app ID and secret as what's in GitHub, then the Site URL is configured as http://localhost:8080/spring-social-quickstart/. Therefore, it will try to redirect back to http://localhost:8080/spring-social-...nnect/facebook.

    My guess is that when you run locally, you're hitting the app through your browser at http://localhost:8080/spring-social-quickstart/. But when on your Android, you can't use "localhost", so you're using some other host name for your machine. No matter what that is, it isn't the same as "localhost", so the base URL doesn't match. That's probably your problem.

    My recommendation is to go to https://developers.facebook.com/ and register your own application and replace the out-of-the-box app ID/secret with your new app's ID/secret. Be sure to set the Site URL to something that you can hit both from your local browser and your Android browser. Should work then.

    Comment


    • #3
      Than you, this fixed my problem and i am now able to acces it both on my desktop and mobile device.

      Originally posted by habuma View Post
      Whatever URL Facebook redirects to after authorization *must* be based on the Site URL as configured at Facebook. If you're using the same app ID and secret as what's in GitHub, then the Site URL is configured as http://localhost:8080/spring-social-quickstart/. Therefore, it will try to redirect back to http://localhost:8080/spring-social-...nnect/facebook.

      My guess is that when you run locally, you're hitting the app through your browser at http://localhost:8080/spring-social-quickstart/. But when on your Android, you can't use "localhost", so you're using some other host name for your machine. No matter what that is, it isn't the same as "localhost", so the base URL doesn't match. That's probably your problem.

      My recommendation is to go to https://developers.facebook.com/ and register your own application and replace the out-of-the-box app ID/secret with your new app's ID/secret. Be sure to set the Site URL to something that you can hit both from your local browser and your Android browser. Should work then.

      Comment

      Working...
      X