Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter “最好的方法”;“听”;使用某些hashtags发送tweet_Twitter - Fatal编程技术网

Twitter “最好的方法”;“听”;使用某些hashtags发送tweet

Twitter “最好的方法”;“听”;使用某些hashtags发送tweet,twitter,Twitter,使用特定的hashtag“收听”tweet的最佳方式是什么?从Twitter使用什么样的API来实现这一点 我基本上需要检索特定时间段内带有特定hastag的所有tweet 我在想以下方法: 使用Twitter搜索hashtags和poll以继续获得更多结果 使用流式API并过滤掉我想要的结果 选项#2肯定比选项#1好,因为它保证您只会收到一条给定的tweet。使用选项#1,您必须实现自己的唯一性检查,以过滤掉您已经看到的任何结果。这可能会在内存和/或性能方面变得昂贵 出于同样的原因,选项#2也

使用特定的hashtag“收听”tweet的最佳方式是什么?从Twitter使用什么样的API来实现这一点

我基本上需要检索特定时间段内带有特定hastag的所有tweet

我在想以下方法:

  • 使用Twitter搜索hashtags和poll以继续获得更多结果
  • 使用流式API并过滤掉我想要的结果
  • 选项#2肯定比选项#1好,因为它保证您只会收到一条给定的tweet。使用选项#1,您必须实现自己的唯一性检查,以过滤掉您已经看到的任何结果。这可能会在内存和/或性能方面变得昂贵

    出于同样的原因,选项#2也应该消耗更少的带宽,并且可能还允许您比轮询更好地近似实时数据馈送