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())
,但我仍然會得到相同的堆棧跟蹤...
有什麼想法?