使用Facebook4j api从页面发帖 [英] Getting posts from a page using Facebook4j api

查看:323
本文介绍了使用Facebook4j api从页面发帖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道有没有办法使用Facebook4J API从Facebook页面获取所有(甚至最近)的帖子?

I'm wondering if there's a way to use the Facebook4J API to get all (or even recent) posts from a facebook page?

我知道有可能从用户的墙壁或Feed中获取所有帖子,但是在API或文档中找不到任何内容,显示如何从页面获取帖子。

I know it's possible to get all posts from a user's wall or feed, but I can't find anything in the API or the documentation that shows how to get posts from a page.

查看 http://facebook4j.org/en/api-support.html#page 看起来实际上是一组与页面相关的方法,但点击任何一个只是刷新页面,让我认为可能是计划但还没有实现?

Looking at http://facebook4j.org/en/api-support.html#page , it would appear that there is in fact a set of Page related methods, but clicking on any one of them simply refreshes the page, making me think that maybe they are planned but not yet implemented?

我知道可以使用图形API从页面中发帖,但如果可能,我真的会坚持使用Facebook4j。

I know it's possible to get posts from a page using the graph API, but I'd really rather stick with Facebook4j, if possible.

任何输入将非常感谢!

推荐答案

自版本2.0以来,Facebook4J支持页面API。

您可以收到帖子从a Facebook页面通过Facebook#getFeed(PAGE_ID)。
示例:

Facebook4J supports Page APIs since version 2.0.
You can get posts from a facebook page via Facebook#getFeed(PAGE_ID). example:

    ResponseList<Post> feed = facebook.getFeed("eclipse.org");

javadoc: http://facebook4j.org/javadoc/facebook4j/api/PostMethods.html#getFeed()

这篇关于使用Facebook4j api从页面发帖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆