【发布时间】:2018-07-19 20:01:12
【问题描述】:
我在连接到 Linkedin API 时遇到了一些问题。
我正在关注这个https://developer.linkedin.com/docs/android-sdk 和这个https://developer.linkedin.com/docs/android-sdk-auth,但我收到了这个错误代码:
{
"errorCode": "INVALID_REQUEST",
"errorMessage": "either bundle id or package name \/ hash are invalid, unknown, malformed"
}
到目前为止,我的实现非常简单:
public void shareOnLinkedin() {
AuthListener authListener = new AuthListener() {
@Override
public void onAuthSuccess() {
Log.d(TAG, "Success");
}
@Override
public void onAuthError(LIAuthError error) {
Log.d(TAG, error.toString());
}
};
LISessionManager
.getInstance(getApplicationContext())
.init(ColectionDetailActivity.this, buildScope(), authListener, true);
}
private static Scope buildScope() {
return Scope.build(Scope.R_BASICPROFILE, Scope.W_SHARE);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
...
try {
LISessionManager.getInstance(getApplicationContext())
.onActivityResult(this, requestCode, resultCode, data);
} catch (Exception e) {
e.printStackTrace();
}
}
【问题讨论】:
-
可能是系统时间问题..检查你的手机时间..
-
这里有同样的问题,无法让它工作,也找不到任何有用的东西:-(。