【发布时间】:2012-03-12 16:39:20
【问题描述】:
我无法从 LinkedIn 获取请求令牌。我不断收到相同的错误 ecxeption “与服务提供商的通信失败:https://api.linkedin.com/uas/oauth/requestToken”
我不知道为什么会发生这种情况,因为它以前可以正常工作。但现在我在一段时间前用相同的代码尝试它,它就是行不通。我的代码如下:
public final LinkedInOAuthService oAuthService = LinkedInOAuthServiceFactory
.getInstance().createLinkedInOAuthService(CONSUMER_KEY,
CONSUMER_SECRET);
public static final String OAUTH_CALLBACK_URL = "x-oauthflow-linkedin"
+ "://" + "litestcalback";
try
{
liToken = oAuthService.getOAuthRequestToken(OAUTH_CALLBACK_URL);
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(liToken
.getAuthorizationUrl()));
startActivity(i);
}catch (Exception e) {
// TODO: handle exception
liToken = null;}
请谁能告诉我我做错了什么。
【问题讨论】:
-
您找到解决方案了吗?我也面临同样的问题。
-
我想我必须更正设备的日期和时间。它开始工作。希望这对你也有用。
-
您的评论帮助我解决了这个问题,请将其添加到答案中。
标签: android integration linkedin