How to limit tweet response count from /1.1/statuses/user_timeline.json API?


#1

Hey guys I am trying to limit the response from the Twitter API. I know I can specify count=3 in the query string but as soon as I do that I am getting a 401 error. Do I need to specify the count in either A my authorization header, or B my authorization signature somewhere. If it only needs to go in the Query string should it go before or after my username?

This works perfect.
https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=DIYMediaService

This returns a 401
https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=DIYMediaService&count=1

Thanks in advance for the help.


#2

Hello.

See here:


https://dev.twitter.com/issues/340


#3

I’m having exactly the same issue, these articles don’t seem to help, no mention of count! Did you manage to fix this @DIYMediaService


#4

I’ve been reading for an hour to no avail, but I have just found the answer using the OAuth tool in My Applications. I noticed the count parameter for API 1.1 was being put at the start of the Signature base string. You will receive a 401 Unauthorized error from the service if this isn’t in the right place!


#5

i am getting user time line after authentication but I am getting null as error message and unkown as request.response how can i get latest time line by fixing it…
i am using this line of code
OAuthTokens tokens = new OAuthTokens()
{
AccessToken =“xxxx”,
AccessTokenSecret = “xxx”,
ConsumerKey = “xxx”,
ConsumerSecret = “xxx”
};

    TwitterResponse<TwitterUser> twitterResponse = TwitterAccount.VerifyCredentials(tokens);

Thanks-Faiq
faiqueali_109@live.com