0

I am working on an application where I need to integrate the social functionality of Facebook.

What I want is to know if the user is already connected to Facebook through a Facebook application or some other application that uses Facebook, and use this authentication. That means that if the user is already connect to Facebook through his device I recognize that and use it in my application - not ask the user for a new login.

Is it possible?

I found a lot stuff in the web, but nothing is related to that. I already downloaded the facebook SDK and added it to my project. I saw that there is a method (facebook.getAccessToken()) to get the access token, but I think I can use it only if the user do his first login in my application.

Any help would be great. Thanks.

Ofir A.
  • 3,112
  • 11
  • 57
  • 83
  • Check your question is answered here http://stackoverflow.com/questions/5109754/how-can-i-authenticate-to-my-applications-webservice-after-using-facebook-sso-on?rq=1 –  Jun 19 '12 at 14:49

1 Answers1

0
That means that if the user is already connect to Facebook through his device I recognize that and use it in my application - not ask the user for a new login. 

Yes it is possible..This is called as Single-Sign-On in facebook , by default Single-Sign-On is enabled. One and only thing you have to do is that you need to generate Hash Key and Register with your Application created in Facebook.

Also it is possible to disable Single-Single-On by passing an extra parameter as below :

authenticatedFacebook.authorize(context PERMISSIONS,-1,new LoginListener());

-1 - refers disabling SSO

Single-Sign-On is clearly explained in Facebook Documentation..

Venky
  • 11,049
  • 5
  • 49
  • 66
  • When I register my Application in Facebook site, I see it on the apps in the Facebook app, why is that? thanks. – Ofir A. Jun 20 '12 at 14:31