FacebookグラフAPIを呼び出すためのJavaラッパーとしてRestFbを使用しています。管理者としてファンページに投稿したい。現在、すべての投稿は私の個人的な投稿として表示されます。権限の1つとして「manage_pages」を使用してaccess_codeを取得しました。これが私のコードです:
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();
}
二重引用符で囲まれたすべてのパラメーターを実際の値に置き換えました。他に何が必要ですか?