0
我正在使用RestFb作为Java包装来调用Facebook图形API。我想以管理员的身份发布到我的粉丝页面。目前,所有帖子均显示为我的个人帖子。我已将access_code用作“manage_pages”作为权限之一。这里是我的代码:如何发布到Facebook粉丝页面墙作为管理员
public void postOnWall(String wallId, String message, String picture, String link, String linkname, String caption, String description) throws FacebookException {
facebookClient.publish(wallId+"/feed", FacebookType.class,
Parameter.with("message", message),
Parameter.with("picture", picture),
Parameter.with("link", link),
Parameter.with("name", linkname),
Parameter.with("caption", caption),
Parameter.with("description", description));
}
,并在我的调用方法:
try {
FacebookService facebookService = new FacebookService("access_token");
facebookService.postOnWall("page_id", comment, "image", "link", title, "caption", description);
} catch (FacebookException e1) {
e1.printStackTrace();
}
我已经取代与实际值双引号的所有参数。还需要什么?
尽管downvote吨至
/{page id}/feed
,我敢肯定我是对这个,除非有一些细节在原来的问题 – Igy由于缺少卵黄抗体,刚才我想通了,我没不会降低你的答案。我只需要使用/ me/accounts连接。只需输入https://graph.facebook.com/me/accounts?access_token="my访问令牌即可获得响应“即可获得该代码。 – Jayz