401 Authentication credential error on requesting user timeline based on userid


#1

Hi,

I am using twiiter4j to crawl 200 tweets from users timeline for a set of 300 users.
I got the following error:

401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
Failed to get timeline: 401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
{“request”:"/1.1/statuses/user_timeline.json?user_id=132859772&include_my_retweet=true&count=500&page=1&include_entities=1&include_rts=1",“error”:“Not authorized.”}

Following is the function I am trying to use:
statuses = twitter.getUserTimeline(userid,paging);

Please advise me how to solve this issue?