0

I am dealing for a long time with this problem. I have registered my app on facebook but I stil getting this error:

{"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500}

my code :

facebook = new Facebook("3************0");
facebook.authorize(this, new String[] { "publish_stream","user_status"}, new FaceDialog());
// dialog will shown and I log in into facebook
String token = facebook.getAccessToken(); // returns null

Bundle parameters = new Bundle();
parameters.putByteArray("message", "Haloooo".getBytes());
parameters.putByteArray("description", "test test test".getBytes());
response = facebook.request("me");
response = facebook.request("me/feed", param, 
                    "POST");

Does someone solved this problem ?

Smolda
  • 882
  • 5
  • 13
  • 34
  • Solved. FACEBOOK.FORCE_DIALOG_AUTH ! – Smolda Aug 06 '12 at 10:23
  • Hi, I have same problem. Would you please what did you do with more details? Thanks – Hesam Sep 16 '12 at 12:05
  • You hate put FACEBOOK.FORCE_DIALOG_AUTH constant to the method facebook.authorize.. which will show you login dialog. – Smolda Oct 12 '12 at 12:12
  • 1
    thanks. yes you are right. For those who still has problem and needs a sample code, I created a sample project and explained how to post on Facebook. You can review it through: https://github.com/Hesamedin/FacebookSharing – Hesam Oct 13 '12 at 17:40

0 Answers0