1
我想发短信到我的facebook墙上。我的示例代码:Facebook发布到墙上的例外
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();
}
}
我呼吁授权功能,使调用这个函数之前得到ACCESS_TOKEN。但有以下类型的错误:
key message expected byte[] but value was a java.lang.String. The default value <null> was returned.
当我在我的Facebook墙上看到,后可见有太多... 任何想法... ???
是的,你是对。还有一件事,在张贴到墙上时,请求会返回类似于ID的内容。这是什么...???其实我是新来的机器人,并试图将Facebook整合到一些本地应用程序。 –
呃,你刚刚告诉有人使用Graph API,它是'旧'并且使用REST API来代替?这与他们应该做的事情完全相反 – Igy
他没有给我们提供错误消息,假设从API返回了一个错误消息,但是推荐更新方式为'/ {user-id}/feed'的POST请求用户的状态/帖子到他们的墙上 – Igy