0
過程上傳圖片的朋友牆, 響應弗里斯特上傳圖片到用戶的牆,和書房讓圖片ID和紐帶,發佈圖片好友留言的Android 3.0
無法張貼在留言板圖像,請建議我是否需要任何fb配置和fb權限?
if (hasPublishPermission()) {
RequestBatch requestBatch = new RequestBatch();
for (GraphUser friend : selectedFriends) {
Bundle parameters = new Bundle();
Constants.showLog(TAG, String.valueOf(friend.getFirstName()));
parameters.putString("message", "Greetings!!");
parameters.putString("link", imagelink);
parameters.putString("picture", imagelink);
parameters.putString("target_id", friend.getId());
requestBatch.add(new Request(Session.getActiveSession(), friend.getId() + "/feed", parameters,
HttpMethod.POST));
Constants.showToast(this, "Posted picture on your friends wall");
}
requestBatch.addCallback(new Callback() {
@Override
public void onBatchCompleted(RequestBatch batch) {
Constants.showLog(TAG, "Posted to :" + batch.size());
}
});
Request.executeBatchAsync(requestBatch);
}