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

  • Spring Social Showcase Example

    Hi ,

    I have tried this example out and wanted to know if the processes can be customized.

    1) I am running my web application on a server http://localhost/ something, but I have a static IP . So , in twitter callback URL I have mentioned it as my url but everytime I start the server ,it directs me to the where I need to authorise my web application with twitter everytime. So, it makes the oauthentication a bit redudant. Is there something wrong I am doing?

    2) The same applies with linkedIn. Also, the Oauth code I get back from Twitter/LinkedIN, I am going to store it in a *.properties file. Which class should I return it to the next time I want to make a call to twitter?

    Could you please help me with the following.

    Thanks and Regards,

  • #2
    If you're using the showcase example, and if you've not made any special changes to the database configuration therein, then each time you restart the application, you start with a brand new, clean database. Therefore, any connections that were created on the previous run are gone and your app must be authorized again (which is what you described as what is happening).

    That's just a sample app and so the embedded, in-memory database it uses is sufficient. If you want to store the connections such that they survive a server restart, you'll need to configure it with a real, persistent database.

    Regarding #2, I'm not sure if I understand what you're wanting to do, sounds like you just want the access tokens you receive during authorization to survive a restart. If you fix the persistent database problem, then you won't need to store them in a properties file (in fact, storing them in a properties file isn't really such a good idea in most scenarios).