我在連接Linkedin API時遇到了一些問題。Linkedin Android SDK - 無法連接到API(INVALID_REQUEST)
我下面這個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();
}
}
你可能會發現這些有用的http://stackoverflow.com/questio ns/29787977/android-linkedin-mobile-sdk-error http://duladissa.blogspot.com.au/2015/03/android-linkedin-sdk-100-usage.html讓我知道你是否需要更多幫助。 –
可能是系統時間問題..檢查你的移動時間.. – uday
同樣的問題在這裏,不能得到這個工作,也沒有發現任何有用的:-(。 –