i am trying to get the authtoken using twitter 4j i put it in try and catch but it catches always this error
twitter4j.TwitterException: Not trusted server certificate
here it is my function
public String BeginAuthorization()
{
try
{
if(null==currentRequestToken)
{
currentRequestToken=twitter.getOAuthRequestToken();
}
return currentRequestToken.getAuthorizationURL();
}
catch (TwitterException e) {
// TODO: handle exception
e.printStackTrace();
}
return null;
}
I have figure it out i changed the emulator i was running on 2.1 i changed to 2.2 then i added this line
System.setProperty("twitter4j.http.useSSL", "false");before making an instance of twitter and it works