Results 1 to 2 of 2

Thread: How to do logout from Facebook Connection via Spring social

  1. #1

    Default How to do logout from Facebook Connection via Spring social

    Hi all,

    I am developing one application in that i am able to login the user using spring-social-facebook api.

    and I need to perform logout() functionality, when ever the user sign out from my application, user should also logout from facebook,twitter,etc..

    I am using spring security (in my application) for login and logout.


    Thanks,
    Madhav.

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

    Default

    Spring Social's Facebook API binding uses Facebook's Graph API and there is no way that I'm aware of that you can logout a user via the Graph API. Likewise with Twitter and other providers However...

    You can accomplish Facebook logout by redirecting to the following URL:

    Code:
    https://www.facebook.com/logout.php?next=YOUR_REDIRECT_URL&access_token=USER_ACCESS_TOKEN
    You can also log a user out of FB using FB's JavaScript API by calling FB.logout() from the client-side.

    So, after the user is logged out of your app, you could follow that up with a redirect to that FB URL.

    I'm not sure that this is necessarily a good thing to do, however. I would think that most users would be a bit upset to find out that by logging out of your app that they are also logged out of Facebook.
    Craig Walls
    Spring Social Project Lead

Posting Permissions

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