我正在使用新的 FB Android SDK 3.0 将照片发布到 FB。我现在正在寻找一种方法来设置更多参数,而不仅仅是图像本身和简单的文本。我尝试了很多不同的参数,但它们似乎都没有做某事。
我想做的是添加一个链接、一个图标,如果可能的话,在 Like 和 Comment 链接旁边添加一个自定义链接项。
以下是来自 twitter 的图标和自定义链接项的示例:
这是我目前使用的代码:
byte[] data = get binary image data;
Bundle postParams = new Bundle();
postParams.putString("name", "Image text");
postParams.putByteArray("picture", data);
// All these parameters do nothing...
postParams.putString("icon", "http://www.myimage.com/image.png");
postParams.putString("message", "XXX");
postParams.putString("caption", "Build great social apps and get more installs.");
postParams.putString("description", "The Facebook SDK for Android makes it easier and faster to develop Facebook integrated Android apps.");
postParams.putString("link", "https://developers.facebook.com/android");
Request request = new Request(Session.getActiveSession(), "me/photos", postParams, HttpMethod.POST);
Response r = request.executeAndWait();
帖子看起来像这样: