2

如何使用 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);

上面的代码没有显示图像,它显示了一些符号。

4

1 回答 1

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);

谢谢..

于 2014-05-17T10:38:00.620 回答