restfb getFrom为我的账户以外的其他人返回null

时间:2018-08-29 22:45:54

标签: restfb

FacebookClient fClient = new DefaultFacebookClient(token);

                Connection<Post> posts = fClient.fetchConnection(page + "/posts", Post.class);

                for (List<Post> page : posts)
                {
                    for (Post post : page)
                    {
                        Comments comments = fClient.fetchObject(post.getId() + "/comments", Comments.class, Parameter.with("fields", "message,likes,name,from"));

                        for (Comment co : comments.getData())
                        {
                            if (co.getFrom() == null)
                            {
                                continue;
                            }
                            System.out.println(co.getFrom().getName());
                        }

                    }
                }

此功能适用于我的facebook帐户,但如果有人评论getFrom() 返回始终为null。为什么会发生这种情况?

0 个答案:

没有答案