【问题标题】:Scribe with LinkedIn throw Response body is incorrect带有 LinkedIn throw 响应正文的抄写员不正确
【发布时间】:2015-05-18 23:29:02
【问题描述】:

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

【问题讨论】:

    标签: android scribe linkedin-api


    【解决方案1】:

    【讨论】:

      【解决方案2】:

      我会在 Linkedin 开发者页面上仔细检查您的 LinkedIn 应用程序,以确保您已检查 _fullprofile 权限。至于身体的读数,这将是你的问题。

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2011-09-29
        • 1970-01-01
        • 2011-04-25
        • 2020-05-27
        • 1970-01-01
        • 2017-05-24
        • 2018-11-19
        • 1970-01-01
        相关资源
        最近更新 更多