Twitter exclude_replies = true count = 5不返回5条推文 [英] Twitter exclude_replies=true count=5 not returning 5 tweets

查看:109
本文介绍了Twitter exclude_replies = true count = 5不返回5条推文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何退回特定条推文没有?

https://github.com/thujohn/twitter/issues/4

我在github上找到了这个答案,但这根本没有帮助.是否应该在while循环中向API发出请求,直到获得5条推文?真的吗?

I found this answer on github but it is not helpful at all. Should make request to API in a while loop until i get 5 tweets? Really?

谢谢您的帮助.

这些是我的参数:const params = {lang:'en',count:5,//我要5条推文user_id:12312312,screen_name:"somescreenname",tweet_mode:'扩展',//我需要媒体exclude_replies:正确,//我不希望回复include_rts:1,//我希望从用户转发}

推荐答案

在twitter API时间轴请求中,例如

In twitter API timeline requests, for example user timeline, replies are removed after count tweets are selected.

将exclude_replies与count参数一起使用将意味着您将接收最新的计数推文-这是因为count参数在过滤掉转发和回复之前,检索了那么多推文.

Using exclude_replies with the count parameter will mean you will receive up-to count tweets — this is because the count parameter retrieves that many Tweets before filtering out retweets and replies.

我建议您使用更大的 count (最多200个),然后从响应中选择前五个推文.

I would suggest you to use a larger count (upto 200 is allowed) and select first five tweets from the response.

这篇关于Twitter exclude_replies = true count = 5不返回5条推文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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