I want to get Profile picture from twitter api.
i have tried the following methods .
a) as per this url :Twitter4j authentication credentials are missing and Retrieve the user profile image from twitter
//Twitter Conf.
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setDebugEnabled(true)
.setOAuthConsumerKey(CONSUMER_KEY)
.setOAuthConsumerSecret(CONSUMER_SECRET)
.setOAuthAccessToken(ACCESS_KEY)
.setOAuthAccessTokenSecret(ACCESS_SECRET);
TwitterFactory tf = new TwitterFactory(cb.build());
Twitter twitter = tf.getInstance();
User user = twitter.showUser(id of other user who using same app);
user.getOriginalProfileImageURL()
in this method get Exception
08-29 09:05:26.282: W/System.err(3823): 404:The URI requested is invalid or the resource requested, such as a user, does not exists. Also returned when the requested format is not supported by the requested method.
08-29 09:05:26.282: W/System.err(3823): message - Sorry, that page does not exist.
b) as per this latest url
https://dev.twitter.com/docs/api/1.1/get/users/profile_banner
pass screen name of user here :
https://api.twitter.com/1.1/users/profile_banner.json?screen_name=iRohitSachdeva
response: {"errors":[{"message":"Bad Authentication data","code":215}]}.