Scribe with LinkedIn 抛出 Response body is incorrect
Scribe with LinkedIn throw Response body is incorrect
我使用 Scribe 连接到 LinkedIn。但是我在尝试连接时收到此错误:
org.scribe.exceptions.OAuthException: Response body is incorrect. Can't extract token and secret from this: 'oauth_problem=Scope%20NOT_AUTHORIZED%20%3A%20r_fullprofile'
我使用此代码获取 RequestToken
authService = new ServiceBuilder().provider(LinkedInApi.class).apiKey(LINKEDIN_APP_ID).apiSecret(LINKEDIN_APP_SECRET).callback
(LINKEDIN_CALLBACK).build();
new RequestTokenTask().execute();
//some code
class RequestTokenTask extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... params) {
try {
requestToken = authService.getRequestToken(); //error here
authURL = authService.getAuthorizationUrl(requestToken);
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
@Override
protected void onPreExecute() {
progressBar.setVisibility(View.VISIBLE);
}
@Override
protected void onPostExecute(Void result) {
progressBar.setVisibility(View.GONE);
webView.loadUrl(authService.getAuthorizationUrl(requestToken));
}
}
我该如何解决这个问题?
更新:
我在设置 "r_fullprofile" 权限中看不到。我做错了什么?
我会在 Linkedin 开发者页面上仔细检查您的 LinkedIn 应用程序,以确保您检查了 _fullprofile 权限。正如 body 它的读出那样,这将成为你的问题。
编辑:另请务必检查此项,因为它可以帮助您解决问题
https://developer.linkedin.com/blog/posts/2015/developer-program-changes
权限 "r_fullprofile" 已弃用。
https://developer.linkedin.com/support/developer-program-transition
我使用 Scribe 连接到 LinkedIn。但是我在尝试连接时收到此错误:
org.scribe.exceptions.OAuthException: Response body is incorrect. Can't extract token and secret from this: 'oauth_problem=Scope%20NOT_AUTHORIZED%20%3A%20r_fullprofile'
我使用此代码获取 RequestToken
authService = new ServiceBuilder().provider(LinkedInApi.class).apiKey(LINKEDIN_APP_ID).apiSecret(LINKEDIN_APP_SECRET).callback
(LINKEDIN_CALLBACK).build();
new RequestTokenTask().execute();
//some code
class RequestTokenTask extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... params) {
try {
requestToken = authService.getRequestToken(); //error here
authURL = authService.getAuthorizationUrl(requestToken);
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
@Override
protected void onPreExecute() {
progressBar.setVisibility(View.VISIBLE);
}
@Override
protected void onPostExecute(Void result) {
progressBar.setVisibility(View.GONE);
webView.loadUrl(authService.getAuthorizationUrl(requestToken));
}
}
我该如何解决这个问题?
更新:
我在设置 "r_fullprofile" 权限中看不到。我做错了什么?
我会在 Linkedin 开发者页面上仔细检查您的 LinkedIn 应用程序,以确保您检查了 _fullprofile 权限。正如 body 它的读出那样,这将成为你的问题。
编辑:另请务必检查此项,因为它可以帮助您解决问题 https://developer.linkedin.com/blog/posts/2015/developer-program-changes
权限 "r_fullprofile" 已弃用。
https://developer.linkedin.com/support/developer-program-transition