【发布时间】:2012-11-14 19:59:57
【问题描述】:
我需要发送短信、位图图像(不是网址!)和 Facebook 墙的链接。我尝试了两种方法:
首先是使用me/feed。它允许我发送消息和链接,但不能发送图像:
postParams.putByteArray("picture", data);
postParams.putString("message", "My message here");
postParams.putString("link", "http://www.google.com");
Request request = new Request(session, "me/feed", postParams, HttpMethod.POST, callback);
我收到一个异常:“图片网址格式不正确”。
第二种是使用me/photos:
postParams.putByteArray("photo", data);
postParams.putString("message", "My message here");
postParams.putString("link", "http://www.google.com");
Request request = new Request(session, "me/photos", postParams, HttpMethod.POST, callback);
在这种情况下,帖子已成功发布并出现在 Facebook 墙上,但没有 link。
我如何将这三件事一起发布?
【问题讨论】:
标签: android facebook facebook-graph-api