如何使用facebook groupid使用facebook4j api将图片发布到用户组。
PostUpdate post = new PostUpdate(new URL("projectUrl")).picture(new URL("projectUrl/waz24.jpg")).name("Facebook4J - A Java library for the Facebook Graph API");
facebook.postGroupFeed(getId, post);
上面的代码没有显示图像,它显示了一些符号。
答案 0 :(得分:0)
使用此功能与链接和说明共享照片。
PrivacyParameter privacy = new PrivacyBuilder().setValue(PrivacyType.ALL_FRIENDS).build();
PostUpdate postUpdate = new PostUpdate(new URL("http://facebook4j.org"))
.picture(new URL("http://facebook4j.org/images/hero.png"))
.name("Facebook4J - A Java library for the Facebook Graph API")
.caption("facebook4j.org")
.description("Facebook4J is a Java library for the Facebook Graph API. This library provides the ease of use like Twitter4J. Facebook4J is an unofficial library.")
.privacy(privacy);
String postId = facebook.postFeed(postUpdate);
谢谢..