Questions tagged [tweetstream]

Tweetstream provides access to Twitter's Streaming API in python or ruby

Tweetstream for ruby

Twitter’s Streaming API is one of the most exciting developments in the Twitter API in some time. It gives you the ability to create a long-standing connection to Twitter that receives “push” updates when new tweets matching certain criteria arrive, obviating the need to constantly poll for updates. TweetStream is a Ruby library to access the new API.

to install run:

gem install tweetstream

Tweetstream for python

tweetstream for python provides two classes, SampleStream and FollowStream, that can be used to get tweets from Twitter's streaming API. An instance of one of the classes can be used as an iterator. In addition to fetching tweets, the object keeps track of the number of tweets collected and the rate at which tweets are received.

SampleStream delivers a sample of all tweets. FilterStream delivers tweets that match one or more criteria. Note that it's not possible to get all tweets without access to the "firehose" stream, which is not currently avaliable to the public.

to install run:

pip install tweetstream
88 questions
3
votes
0 answers

Rails gem tweetstream with Encryption not available on this event-machine error

I'm trying to display tweets using gem tweetstream and following the guide at https://github.com/tweetstream/tweetstream In my tweets_helper.rb require "twitter" require 'tweetstream' module TweetsHelper @@client =…
Victor Yee
  • 151
  • 1
  • 14
3
votes
1 answer

Tracking a tweeter hashtag (keyword) with stream API

I am trying to track all tweets by given hashtag or keyword. The problem is I can stream the tweets when I use a simple keyword like 'animal' but when I change it to say 'animal4666' then it doesn't work. No reply is received. I am using the code…
Sahil
  • 1,959
  • 6
  • 24
  • 44
3
votes
0 answers

Tweetstream Gem: Change tracking keywords

I am using the gem Tweetstream to access the twitter streaming API. Currently I am wondering what would be the correct way to change the tracked keywords. The user of my application can provide new keywords to be tracked at any time. My first idea…
NilsHaldenwang
  • 3,567
  • 3
  • 20
  • 30
2
votes
2 answers

Twitter api php foreach loop not working for users tweets

I am using the twitter api php abraham libary and i am trying to loop through the users tweets, but i am having trouble. I am getting all the users tweets from the home timeline using this. $content =…
Stuart Compaan
  • 177
  • 1
  • 1
  • 10
2
votes
0 answers

Tweetstream foreman not working until killed

I'm using the TweetStream gem for rails 3.2 with ruby 1.9.3 as a background process to run code as tweets are pulled in. I've got it working using rails runner, but now I want to move it to heroku, so I've set it up as a rake task. The process…
Pat Marx
  • 319
  • 2
  • 12
2
votes
2 answers

Ruby-on-Rails: How to access create action, without leaving index

Trying to create new tweets to display in my index, but I don't wanna leave the page. My app's desired function is to track tweets from tweetstream, and automatically pass that info into my tweet object and save to db. Controller: class…
Greg
  • 305
  • 1
  • 4
  • 11
2
votes
4 answers

Gem installing error

Wont install this gem, and I get this response. greg@greg-VirtualBox:~$ gem install tweetstream Building native extensions. This could take a while... ERROR: Error installing tweetstream: ERROR: Failed to build gem native…
Greg
  • 305
  • 1
  • 4
  • 11
2
votes
0 answers

Timeout Python Tweetstream Api

I am using the following code to get tweets from twitter using Python Tweetstream library but if I use certain words which have no meaning or words for which there are no tweets the streaming get stuck. I want to timeout of streaming after certain…
2
votes
3 answers

Storing tweets using tweetstream in MongoDB fails with following error

I have just started to learn ruby and concept of mongodb. This is the script that I am trying to run require 'rubygems' require 'tweetstream' require 'mongo' TweetStream.configure do |config| config.consumer_key = '' config.consumer_secret…
2
votes
2 answers

Is there an easy way to get twitter mentions using a ruby gem?

I've tried using the gem twitter, grackle, and TweetStream but I can't figure out how to get a stream of a users @mentions. I just can't figure out how to put together a bit of code that says 'get all mentions to user'. (and I want to tap into the…
alexbooots
  • 383
  • 6
  • 22
1
vote
1 answer

adding new users to twitterstream follow

I am trying to get the tweets using twitterstream gem. list_of_users = [612473, 759251, 1367531, 6017542, 6509832] TweetStream::Client.new.follow(list_of_users) do |status| puts "follow…
RSK
  • 17,210
  • 13
  • 54
  • 74
1
vote
1 answer

Stream Live tweets from a specific user (Ruby)

I am using the tweetstream gem in order to communicate with the Twitter API. I am able to stream tweets, and won't mind switching to the regular twitter gem if I need to. I just want to get live updates of when a specific account posts. What is the…
evan
  • 61
  • 1
  • 11
1
vote
1 answer

How to filter tweets via the since/until parameters in Twitter4J queries?

I m listening twitter streams by coordinate using twitter4j without any input keyword, as i know twitter api just gives tweets of last 7 days. My code was working funny and i had an network problem and i could not get streams of 2 days ago. i need…
Mustafa K.
  • 45
  • 7
1
vote
0 answers

Tweet json structure

I used this code to fetch tweets and save it into Json file. How can I save it as individual tweets(as json object)! because by this way all the arguments load together for all tweets // Create the Stream var stream =…
Vow
  • 11
  • 3
1
vote
1 answer

Filtering streamed tweets from PubNub

I'm trying to test this code to get a real-time streaming of tweets from Twitter: var PubNub = require('pubnub') var pubnubTwitter = new PubNub({ subscribeKey: "sub-c-788-redacted", }) pubnubTwitter.addListener({ message: function(m) { …
user8423460
  • 125
  • 2
  • 12