Put facebook wall in android

I am trying to integrate single wall wiring from my application. Try this code, but I get a response like this

public void postMessageOnWall(String msg) { Log.d("Tests", "Testing graph API wall post"); try { String response = mFacebook.request("feed"); Bundle parameters = new Bundle(); parameters.putString("message", "dfsagfsadfsafsadf by thamil"); parameters.putString("description", "test test test"); response = mFacebook.request("feed", parameters); Log.d("Tests", "got response: " + response); if (response == null || response.equals("") || response.equals("false")) { Log.v("Error", "Blank response"); } } catch(Exception e) { e.printStackTrace(); } } ' {"error":{"message":"No node specified","type":"Exception"}}' 
+4
source share
2 answers

You need to specify the channel you want to send, for example,

 response = mFacebook.request("me/feed", parameters, "POST"); 

This message will be sent to your own channel.

There are some useful examples on GitHub such as this one (scroll down to testAuthenticatedApi () for an example of what you are trying to do).

+1
source

Source: https://habr.com/ru/post/1380757/


All Articles