gpt4 book ai didi

java - 无法使用 linkedin-j 在 LinkedIN 上发布任何内容

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:27:51 25 4
gpt4 key购买 nike

首先,我的问题是我无法发布任何网络更新、发布共享或通过 ID 邀请。我总是遇到以下异常:

08-29 17:18:04.000: E/AndroidRuntime(4316): FATAL EXCEPTION: main
08-29 17:18:04.000: E/AndroidRuntime(4316): com.google.code.linkedinapi.client.LinkedInApiClientException: Access to posting network updates denied.
08-29 17:18:04.000: E/AndroidRuntime(4316): at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.createLinkedInApiClientException(BaseLinkedInApiClient.java:3906)
08-29 17:18:04.000: E/AndroidRuntime(4316): at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.callApiMethod(BaseLinkedInApiClient.java:3846)
08-29 17:18:04.000: E/AndroidRuntime(4316): at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.postNetworkUpdate(BaseLinkedInApiClient.java:1172)
08-29 17:18:04.000: E/AndroidRuntime(4316): at pl.osadkowski.LITest.LITestActivity.onNewIntent(LITestActivity.java:61)
08-29 17:18:04.000: E/AndroidRuntime(4316): at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1123)
08-29 17:18:04.000: E/AndroidRuntime(4316): at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2042)
08-29 17:18:04.000: E/AndroidRuntime(4316): at android.app.ActivityThread.performNewIntents(ActivityThread.java:2055)
08-29 17:18:04.000: E/AndroidRuntime(4316): at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2064)
08-29 17:18:04.000: E/AndroidRuntime(4316): at android.app.ActivityThread.access$1400(ActivityThread.java:123)
08-29 17:18:04.000: E/AndroidRuntime(4316): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1194)
08-29 17:18:04.000: E/AndroidRuntime(4316): at android.os.Handler.dispatchMessage(Handler.java:99)
08-29 17:18:04.000: E/AndroidRuntime(4316): at android.os.Looper.loop(Looper.java:137)
08-29 17:18:04.000: E/AndroidRuntime(4316): at android.app.ActivityThread.main(ActivityThread.java:4424)
08-29 17:18:04.000: E/AndroidRuntime(4316): at java.lang.reflect.Method.invokeNative(Native Method)
08-29 17:18:04.000: E/AndroidRuntime(4316): at java.lang.reflect.Method.invoke(Method.java:511)
08-29 17:18:04.000: E/AndroidRuntime(4316): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
08-29 17:18:04.000: E/AndroidRuntime(4316): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
08-29 17:18:04.000: E/AndroidRuntime(4316): at dalvik.system.NativeStart.main(Native Method)

其次,我尝试了什么?好吧,我确定我还没有尝试过所有方法,否则它会起作用,但我觉得我已经用尽了所有可能性。我尝试过的一些事情无济于事:

https://developer.linkedin.com/documents/authentication#granting

https://stackoverflow.com/a/10872824/1436210

http://code.google.com/p/linkedin-j/source/browse/trunk/linkedin-j/core/src/examples/java/com/google/code/linkedinapi/client/examples/PostNetworkUpdateExample.java?r=197

http://code.google.com/p/linkedin-j/wiki/GettingStarted

http://code.google.com/p/linkedin-j/wiki/AndroidConfiguration

我真的希望有人能帮忙!!我会尝试任何事情!一百万!

最佳答案

我修复了 1.0.429 版 linkedin-j-android.jar 的范围参数

这里是下载带有范围修复的补丁 linkedin-j-android.jar 的链接

http://db.tt/yQjhqeq3

用法是这样的,它是附加参数

private String CONSUMER_KEY="XX"; // your consumer key here
private String CONSUMER_SECRET="YY"; // your consumer secret here
private String scopeParams="rw_nus+r_basicprofile";

LinkedInOAuthService oAuthService=LinkedInOAuthServiceFactory
.getInstance().createLinkedInOAuthService(
CONSUMER_KEY,CONSUMER_SECRET, scopeParams);

希望这有帮助..

关于java - 无法使用 linkedin-j 在 LinkedIN 上发布任何内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12188341/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com