如何获取超过25条帖子 [英] How to fetch more than 25 post messages

查看:64
本文介绍了如何获取超过25条帖子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用restfb获取所有帖子,我的代码如下

I'm trying to get all post messages using restfb, my code is as follows

public Connection<Post> publicSearchMessages(Date fromDate, Date toDate) {
    Connection<Post> messages = publicFbClient.fetchConnection("search",
            Post.class,
            Parameter.with("q", "Watermelon"),
            Parameter.with("since", fromDate),
            Parameter.with("until", toDate),
            Parameter.with("type", "post"));

    return messages;
}

这仅提供最新的25条帖子消息.

This only gives latest 25 post messages.

Parameter.with("limit",100)

Parameter.with("limit",100 )

如果我设置了limit参数,它会给出100条消息,但是我不想限制为获取帖子消息.所以,

If i set limit parameter, it gives 100 messages but i don't want to limit to fetching post messages. So,

反正我可以在不设置限制参数的情况下获得符合搜索条件的完整帖子列表吗?

Is there anyway I can get a full list of post messages matching the search criteria without setting limit parameter?

推荐答案

无法从FB获取无限结果.默认限制设置为25.如您所知,您可以使用limit参数更改此限制.我尚未找到限制搜索网络的上限.也许可以将其设置为非常高的水平.

There is no way to fetch unlimited results from FB. The default limit is set to 25. As you know, you can change this using the limit parameter. I have not found an upper border for limit searching the web. Maybe, you can set it to a very high amount.

这篇关于如何获取超过25条帖子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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