0

我使用 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”权限时看不到。我做错了什么? 领英

4

2 回答 2

1

权限“r_fullprofile”已弃用。

https://developer.linkedin.com/support/developer-program-transition

于 2015-05-18T15:29:02.440 回答
-1

我会在 Linkedin 开发人员页面上仔细检查您的 LinkedIn 应用程序,以确保您已检查 _fullprofile 权限。就像身体一样,它的读数会成为你的问题。

编辑:还要确保检查这个,因为它可以帮助您解决问题 https://developer.linkedin.com/blog/posts/2015/developer-program-changes

于 2015-05-18T13:45:32.137 回答