Userstream.twitter.com is giving me all tweets going through Twitter, not the users timeline


#1

HI all,

When I query the Streaming API https://userstream.twitter.com/1.1/user.json, I get all tweets going through Twitter not user specific ones. My parameters are below:

$filters = array(
    "stringify_friend_ids" => "true",
    "with" => "followings"
);

any ideas?

Thanks,


#2

The parameter with should be set with “user” value to achieve what you want to do. So your code fixed is:

$filters = array( "stringify_friend_ids" => "true", "with" => "user" );

Check the docs for full explanation: https://dev.twitter.com/docs/streaming-apis/streams/user#Data_from_accounts_the_user_follows


#3

My bad figured that out as well. One issue I’m having. If a user posts two tweets, I only get the second tweet. Not the first one. Any ideas on what can cause this?


#4

You should get 2 tweets in userstream. Is this behavior reproducible?