Texto de publicación de Facebook en la pared: token de acceso siempre NULL

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

{"error": {"mensaje": "Se debe utilizar un token de acceso activo para consultar información sobre el usuario actual.", "type": "OAuthException", "code": 2500}

mi código :

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 ?

preguntado el 02 de julio de 12 a las 18:07

Solved. FACEBOOK.FORCE_DIALOG_AUTH ! -

Hi, I have same problem. Would you please what did you do with more details? Thanks -

You hate put FACEBOOK.FORCE_DIALOG_AUTH constant to the method facebook.authorize.. which will show you login dialog. -

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: github.com/Hesamedin/FacebookSharing -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.