我正在使用 facebook4j 来获取评论的回复数,但实际上,无论 id_comment 是什么,它都会返回 null 这是我用来获取评论的代码;我有一个excel文件中的ID
enter code herepublic class RecuperationFacebook {
public static String appId = "appId";
public static String appSecret = "appSecret";
public static String access_token = "";
public static Facebook facebook ;
public RecuperationFacebook()
{
facebook = new FacebookFactory().getInstance();
facebook.setOAuthAppId(appId, appSecret);
facebook.setOAuthAccessToken(new AccessToken(access_token));
}
public static Comment Commentaire(String id_comment) throws FacebookException
{
Comment commentaire =facebook.getComment(id_comment, null);
commentaire.getFrom().getId();
return(commentaire);
}
} //这是我如何使用该函数
Comment commentaire = facebook.Commentaire(id_comment);
Integer Nb_reponse = commentaire.getCommentCount();
System.out.println("Nb_reponse"+Nb_reponse);