I want to post a text message on my facebook wall. My sample code is:
public void postOnMyFacebookWall(String msg) { Log.d("Tests", "Testing graph API wall post"); try { String response = facebook.request("me"); Bundle parameters = new Bundle(); parameters.putString("message", msg); parameters.putString("description", "test test test"); response = facebook.request("me/feed", parameters, "POST"); Log.d("Tests", "got response: " + response); if (response == null || response.equals("") || response.equals("false")) { Log.v("Error", "Blank response"); } } catch(Exception e) { e.printStackTrace(); } }
I called the authorization function and got access_token before calling this function. But received the following type of errors:
key message expected byte[] but value was a java.lang.String. The default value <null> was returned.
And when I see facebook on my wall, a message is also visible there ... Any idea ... ???
source share