Results 1 to 3 of 3

Thread: Handling the return callback from (linkedIn) authorisation

  1. #1
    Join Date
    Jan 2010
    Location
    london
    Posts
    38

    Default Handling the return callback from (linkedIn) authorisation

    Hi,

    this is probably a really simple question - but I have a button that authorises users on my webapp with LinkedIn. It directs the user to the LinkedIn authorisation page (using the url connect/linkedin) and when I then say authorise, i get returned to my webapp with an error that the view connect/linkedin is not known.

    My question is, what is the normal/best practice in these situations? is it just expected that I implement a view with this name?

    What I really want to do is just return the user to the previous page (will be the user profile page) but now the page will display data that has been pulled down from linkedIn - should I create a view and direct to the desired page? is there any way to override the returned view?

    thanks!

  2. #2
    Join Date
    Aug 2004
    Posts
    1,067

    Default

    Yes, that's exactly what you need to do: Implement the view. That is if, as I am assuming, you are using ConnectController to handle the OAuth flow.

    If you look at the Spring Social Showcase sample, you'll see some basic views in src/main/webapp/WEB-INF/view/connect. There are 2 views specific to LinkedIn here:

    - "linkedinConnect" is the view that ConnectController will show when the user hasn't connected with LinkedIn yet and the app is navigated to /connect/linkedin.
    - "linkedinConnected" is the view that ConnectController will show when the user has already connected with LinkedIn yet and the app is navigated to /connect/linkedin.

    That is the default behavior of ConnectController, but it can be overridden by subclassing and overriding the connectView() and connectedView() methods. If you override those methods, then ConnectController could end up showing any view you'd like.
    Craig Walls
    Spring Social Project Lead

  3. #3
    Join Date
    Jan 2010
    Location
    london
    Posts
    38

    Default

    Perfect thanks, that makes a lot of sense.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •