Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Session Provided to a request in unopened state

Facebook friend picker sample in the Facebook SDK 3.0 shows error dialoge box. the message box says: 'com.facebook.Facebook Exception : Session Provided to a request in unopened state.'

like image 701
null pointer Avatar asked Jan 08 '13 10:01

null pointer


1 Answers

I had this exact error, if you are running this from Eclipse then there is a good chance there is a more detailed error in the log cat. For me I found the real error was that my Android hashkey did not match up with the hashkey I had provided to Facebook.

Double check that the hashkey you are using is correct. See this Answer for setting up your hashkey

Key hash for Android-Facebook app

Further, using the Keytool did not help me for my HashKey, instead I followed the advice on this guide:

https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/

In step 4, see Troubleshooting, and modify the code to output your HashKey and use that one instead. The hashkey I had generated from Keytool was much different than this one. After that recompile everything, it should work fine.

like image 120
Andrew T. Avatar answered Sep 21 '22 00:09

Andrew T.