User Streams (GET user) retrun error 406 if use "follow" parametr


#1

Hi!
If I use any other parameters in the query (User Streams (GET user)), then all is well. As soon as I start to use the “follow”, the server returns an error 406. What could be the problem?
PS: the same parameter “follow” perfectly fulfills Public API (POST statuses / filter).
Thanks.


#2

Hi @krabonis, perhaps you are using the screen_name? Try using the user_id instead.

If you only have the screen_name, you can get a user_id from the user object returned by users/lookup.


#3

Hi @joncipriano.
I used “user_id.” Here is a sample query: https://userstream.twitter.com/1.1/user.json?follow=4534871. Where there may be a bug?


#4

Hi @krabonis, I just realized what you are trying to do. The documentation is actually incorrect here. Sorry for that, it was probably an error when migrated content to the new site.

The follow parameter cannot be used with User Stream. User Stream will only provide activity for the authenticated user (the user that generated the access tokens). I have updated the documentation to remove the parameter.

However, you can use the follow parameter with statuses/filter. The difference is that statuses/filter will only provide Tweets.

User Stream will provide an assortment of message types, but you will have to require your target user to authenticate with your application to receive their access tokens.

I hope that clears things up for you and thank you for hanging in there.


#5

@joncipriano, thank you very much for your reply and quick fix documentation. Are you nice to deal with).


#6