简体   繁体   中英

Streaming Tweets Via Python

I am using twiiter streaming api and twython module with python 2.7 windows 7 os. I want to click a button and streaming of tweets should start. and on clicking the streaming should stop.I am using python for backend and HTML on front end.I am communicating to python via php using passthru function.when i am giving an ajax call to php on clicking of button then all the tweets is displayed at a time. I want streaming.Can anyone help?Thanks

There are several twitter api libraries for python that have support for the streaming API. Use whichever you find convenient -

  1. Twython - https://github.com/ryanmcgrath/twython
  2. Tweepy - https://github.com/tweepy/tweepy
  3. TitterAPI - https://github.com/geduldig/TwitterAPI

All of them have decent documentation & examples. If you run across any bugs/errors, please refer to their corresponding existing bug lists first.

我正在使用twython并使用长轮询技术来显示流。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM