I am not sure about whether third party authorized application have access to private tweet in twitter b/c i am getting error with {} (with status 200) when i used user timeline REST API.
I am using Twitter-npm.
//Initialise twitter client object-Twitter with keys
var client = new Twitter({
consumer_key: config.twitter.consumer_key,
consumer_secret: config.twitter.consumer_secret,
access_token_key: config.twitter.access_token_key,
access_token_secret: config.twitter.access_token_secret
});
client.get('statuses/user_timeline', tparam, function (error, tweets, response) {
if (error) {
console.log("error : " + JSON.stringify(error)); // error: {}
// i am getting error here {}
} else {
// data
}
});
It does not even get proper error message, so how can i get, why i am not getting tweets. When i analysed i saw :
- if the Protect your tweet is true in setting i am getting 200 with error {}.
- if the protect your tweet is false in setting i am getting 200 with tweets.
i have also asked in twitter-community about this issue , but did not get fully response.
i also tried it using Postman , i get
{"request":"\/1.1\/statuses\/user_timeline.json","error":"Not authorized."}
and if any other error come it give error with code and message for example.
{"errors":[{"code":32,"message":"Could not authenticate you."}]}
why it's not giving such in my case?