Announcement Announcement Module
Collapse
No announcement yet.
Social Showcase - 'login with facebook' (local issues) (and minor readme adjustment) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Social Showcase - 'login with facebook' (local issues) (and minor readme adjustment)

    When the spring social showcase app is deployed locally, and you try to login with the facebook link, you'll end up seeing the json graphapi response in your browser:

    Code:
    {
       "error": {
          "type": "OAuthException",
          "message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration."
       }
    }
    I'm assuming the issue is that since we're running locally FB doesn't recognize the application as a 'real valid' application? However, shouldn't the showcase maybe be handling the error in a more user friendly way? Also if this latter is the case, it would probably help if it mentioned it in the README? The login with FB part of the application is what I really want to step through and use the debugger with.

    Minor comment: The README mentions that you'll be able to view the app as http://localhost:8080/spring-social-showcase, but since the war plugin isn't explicitly being used in the pom which will allow you to define a set war name, the real war name ends up being created with the version number appended (eg spring-social-showcase-1.0.0). My suggestion would be to just use the war plugin in the pom and define the war output name there:

    Code:
    <plugin>
    	<groupId>org.apache.maven.plugins</groupId>
    	<artifactId>maven-war-plugin</artifactId>
    	<configuration>
    		<warName>spring-social-showcase</warName>
    	</configuration>
    </plugin>

  • #2
    The reason you see that error is because FB gives it after you redirect to them. At that point in the process, Spring Social is temporarily out of play and unaware that anything went wrong. I can't think of any way that Spring Social could deal with it.

    In any event, it's a matter of how you've configured the Site URL for the app in Facebook. For the showcase, I have "http://localhost:8080/spring-social-showcase/" as the site URL and it works fine. But that's without the version number in the name...if you're running it where the URL is http://localhost:8080/spring-social-showcase-1.0.0, then that doesn't match the config in FB.

    Point taken on the war plugin. If you run it with 'mvn tomcat:run' it should work (or deploy it to tcServer in STS, which is what I do most often), but if you generate the WAR and deploy it elsewhere it will have the version in the name. You could rename the WAR or configure its context path in the app server. But I'll consider your suggestion with the WAR plugin and <warName>.
    Last edited by habuma; Jul 22nd, 2011, 10:21 AM.

    Comment


    • #3
      Originally posted by habuma View Post
      In any event, it's a matter of how you've configured the Site URL for the app in Facebook. For the showcase, I have "http://localhost:8080/spring-social-showcase/" as the site URL and it works fine.
      Thanks!!! This did the trick. Now I can work on figuring out what's going on. I think I'll learn a lot more from the showcase vs the quickstart. Ok.. on with my Friday and the Spring Social Showcase learning

      thanks again

      Comment

      Working...
      X