Android authtoken不受信任的服务器证书*
我尝试使用Twitter4J获取authtoken,我将它放在了try and catch中,但它总是捕捉到这个错误 twitter4j.TwitterException:不受信任的服务器证书 这是我的职责Android authtoken不受信任的服务器证书*,android,twitter4j,Android,Twitter4j,我尝试使用Twitter4J获取authtoken,我将它放在了try and catch中,但它总是捕捉到这个错误 twitter4j.TwitterException:不受信任的服务器证书 这是我的职责 public String BeginAuthorization() { try { if(null==currentRequestToken) { currentRequ
public String BeginAuthorization()
{
try
{
if(null==currentRequestToken)
{
currentRequestToken=twitter.getOAuthRequestToken();
}
return currentRequestToken.getAuthorizationURL();
}
catch (TwitterException e) {
// TODO: handle exception
e.printStackTrace();
}
return null;
}
我发现我改变了2.1上运行的模拟器,我改为2.2,然后我添加了这行
System.setProperty(“twitter4j.http.usesl”,“false”)代码>在创建twitter实例之前,它可以正常工作