Stream API for tweet like




  1. is there any stream api for getting real time tweet like and unlike?

  2. I am getting error “exceeded connection limit for user twitter” when starting stream api.

Please Help

Thank you


Yes, via User Streams.

You may only have one active connection to the Streaming API per app/IP. If you’ve constantly been connecting and reconnecting, you may also have been rate limited for connection attempts.


Dear andypiper

How can we get a live stream if someone like my tweet?

I am using statuses/filter api, and in parameter I am passing follow: ‘my_user id’. But I am not getting any push when user leaves my tweet


You’re not using User Streams.



Now I am using User stream api using following code.

But i am not able to get live streaming of another user?

Using User stream api i can get only one user live stream?

var T = new Twit({
    consumer_key: 'consumer_key',
    consumer_secret: 'consumer_secret',
    access_token: 'User_access_token',
    access_token_secret: 'User_access_token_secret',
    timeout_ms:           60*1000,  // optional HTTP request timeout to apply to all requests.
var stream ='user',  { stringify_friend_ids: true });

stream.on('user_event', function (eventMsg) {
    console.log('EventMsg : ' + JSON.stringify(eventMsg));

stream.on('tweet', function (tweet) {
    console.log('tweet : ' + JSON.stringify(tweet));

stream.on('favorite', function (tweet) {
    console.log('favorite : ' + JSON.stringify(tweet));


That’s correct, user streams work for the authenticated user token.



I want a live stream of multiple user and User stream provides only one authorized user’s tweet like and tweet.



Any reply?


I’ve explained how the API works, unfortunately there is no way to achieve what you are looking for.


Hi @andypiper

The user stream is not sending me likes/favorite information. It does send me retweet events but not likes/favorites.
Is there any special filter parameter that I need to send with the stream url?



No, there’s no parameter here. You should see favorite events for Tweets the authenticated user likes.


  "event": "favorite",
  "created_at": "Wed Nov 01 13:53:34 +0000 2017",
  "source": { 
  "target": { 
  "target_object": {


@andypiper what about likes that get received on the authenticated user’s tweets


Yes, exactly the same except the source and target users are reversed. I’ve just tested this between two accounts and it is working as expected. It’s also the same for unfavorite events.


@andypiper can you send me your sample url request please? I can’t seem to get like events at all. I do get other events like retweet etc but not likes.
I have been connecting using this:
and using npm to stream.
And thanks for the swift responses. You’ve earned yourself a follower :metal:


I’m simply connecting using twurl:

twurl -t -H -A "Accept-encoding: none" "/1.1/user.json"

When one of my accounts likes or unlikes Tweets for the account I’ve authenticated in twurl, I see the events in the console.

Note that in the future, user streams will be replaced by the Account Activity API which is now in beta.


Thanks a bunch.
I think the twitter NPM isn’t letting events payload through.
Yea, thanks for that I have applied for the AccountActivity API Beta Access🤞
One last question: are un-RT events possible to get as well?


There are no retweet or unretweet events. There are quoted_tweet events.




I am not sure is it is slightly off topic but when I use statuses/filter API i receive chunks of tweets separated by \r\n the problem I am facing while consuming the chunks is that the JSONSerialization.jsonObject is throwing an error complaining about the json format. I am doing this using URLSession and not using Swifter library since there seems to be a few issues with that library with streaming. Plus i actually want to create a TWTRTweet object using the serialized json or json array. I am using Swift for ios and TwitterSDK.