shindesandeep / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

not able to get sessionKey to get FacebookJsonRestClient object #353

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Problem: 
we are currently using the following code to create the FacebookJsonRestClient 
object using which all other API calls were made to get friends etc and other 
details of logged in user.

userClient = new FacebookJsonRestClient(api_key, secret, sessionKey);
long facebookUserID = userClient.users_getLoggedInUser();
friendsList = (JSONArray)userClient.friends_get();

The sessionkey is obtained from the facebook earlier javascript SDK using 
following code

FB.Facebook.apiClient.get_session().session_key

Now the OAuth2.0 flow of facebook has been changed and is no longer
returning the session information via a JSON response, instead it returns only 
accessToken after authentication, now am not able to get the sessionKey to 
create FacebookJsonRestClient object as we do not have the session key.

Is there any way we can get sessionKey using the available accessToken from 
oAuth2.0 response? or any possible conversion of accessToken can get us 
sessionKey? or any recent updates/patches made to facebook-java-api-3.0.2 to 
accomodate this change?

version of the product:
using facebook-java-api-3.0.2

do i need to provide any more details please let us know...

Original issue reported on code.google.com by chaitany...@gmail.com on 12 Oct 2011 at 4:02