我正试图从我的app.i中整合发布到一个人的墙上试试这个代码,但我得到这样的回复
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"}}'
最佳答案 您需要指定要发布到的Feed,例如
response = mFacebook.request("me/feed", parameters, "POST");
这将发布到您自己的Feed.
Facebook在GitHub上提供了一些有用的示例,例如this one(向下滚动到testAuthenticatedApi()方法,以获取您正在尝试执行的操作的示例).