0
最近我一直在努力了解如何从我的应用程序发布在用户Facebook墙上。 我有我的访问令牌,并设法工作的SSO(诀窍是添加Android哈希键),现在用户已被锁定。android:无法发布在我的Facebook墙上,E/IOEX(6326):graph.facebook.com
问题在于发布功能。
public void updateStatus(String accessToken){
try {
Bundle bundle = new Bundle();
bundle.putString("message", "test update"); //'message' tells facebook that you're updating your status
bundle.putString(Facebook.TOKEN,accessToken);
//tells facebook that you're performing this action on the authenticated users wall, thus
//it becomes an update. POST tells that the method being used is POST
String response = facebook.request("me/feed",bundle,"POST");
Log.d("UPDATE RESPONSE",""+response);
} catch (MalformedURLException e) {
Log.e("MALFORMED URL",""+e.getMessage());
} catch (IOException e) {
Log.e("IOEX",""+e.getMessage());
}
}
我总是赶一个IOException,这是我stack trace,此后,我看见我需要传递一个字节数组我改变了束群众演员putByteArray("message", "test update".getBytes())
,也改变了令牌bundle.putByteArray(Facebook.TOKEN,accessToken.getBytes())
,但我仍然会得到相同的堆栈跟踪...
有什么想法?