首先,我的问题是我不能发布任何网络更新,发布股票或按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): …Run Code Online (Sandbox Code Playgroud) 从今天开始,我们使用linkedin javascript SDK对用户进行身份验证的应用程序停止了工作.我们意识到,在调用https://platform.linkedin.com/in.js现在重定向到 https://platform.linkedin.com/xdoor/scripts/in.js.
因此,调用IN.User.Authorize(callbackFunction)成功打开身份验证对话框窗口,但不再触发回调.
此外,在我们的应用程序的另一部分中,我们使用IN.UI.Authorize.place().onWindowRemove.subscribe(callbackFunction)跟踪对话框关闭.此功能也停止了措辞,现在打开一个带有url的新窗口,invalid://控制台抛出此错误:
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. TODO?client_id=XXXX&type=user-agent in.js:7
?
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. invalid://?xdOrigin=https%3A%2F%2FXXX-XXX&xdChannel=XXXX&xd_origin_host=https%3A%2F%2FXXXX.XXXX in.js:7
?
jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. TODO?client_id=XXXX&type=user-agent
Run Code Online (Sandbox Code Playgroud)
你知道为什么停止工作吗?
编辑:错误再次出现2019年01 28.
我无法获取公开个人资料网址并从Android中的LinkedIn api获取或发布.我正在使用linkedin-j-android源码.我能够获得成功的accessstoken但是从这个线路调用时OnNewIntent.
编辑:我在我的应用程序中拥有互联网权限.所以这不会是个问题.
Person profile = client.getProfileForCurrentUser(EnumSet.of(ProfileField.PUBLIC_PROFILE_URL));
Run Code Online (Sandbox Code Playgroud)
@Override
protected void onNewIntent(Intent intent) {
String verifier = intent.getData().getQueryParameter("oauth_verifier");
LinkedInAccessToken accessToken = oAuthService.getOAuthAccessToken(liToken, verifier);
client = factory.createLinkedInApiClient(accessToken);
Person profile = client.getProfileForCurrentUser(EnumSet.of(ProfileField.PUBLIC_PROFILE_URL));
Log.v("","PUBLIC_PROFILE_URL:" + profile.getPublicProfileUrl());
}
Run Code Online (Sandbox Code Playgroud)
应用程序崩溃.以下是日志跟踪.
FATAL EXCEPTION: main
com.google.code.linkedinapi.client.LinkedInApiClientException: java.io.IOException: BufferedInputStream is closed
at com.google.code.linkedinapi.client.impl.LinkedInApiXppClient.unmarshallObject(LinkedInApiXppClient.java:167)
at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.readResponse(BaseLinkedInApiClient.java:3710)
at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.callApiMethod(BaseLinkedInApiClient.java:3777)
at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.callApiMethod(BaseLinkedInApiClient.java:3725)
at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.getProfileForCurrentUser(BaseLinkedInApiClient.java:1122)
Run Code Online (Sandbox Code Playgroud)
请帮我.提前致谢.
我正在尝试通过身份验证后获取来自linkedin用户的电子邮件地址,我现在获得基本配置文件但没有获取电子邮件地
我使用http://code.google.com/p/linkedin-j/downloads/list jar文件进行身份验证.
我已经完整地阅读了这份文件,但并未充分利用我的http://oodlestechnologies.com/blogs/recent-changes-in-linkedin-api.
下面是jar文件属性的代码: -
# API URLs
##########
# Profile API
com.google.code.linkedinapi.client.getProfileForCurrentUser=http://api.linkedin.com/v1/people/~{profileFields}
com.google.code.linkedinapi.client.getProfileById=http://api.linkedin.com/v1/people/id={id}{profileType}{profileFields}
com.google.code.linkedinapi.client.getProfileByUrl=http://api.linkedin.com/v1/people/url={url}{profileType}{profileFields}
#OAuth URLs
###########
com.google.code.linkedinapi.client.oauth.requestToken=https://api.linkedin.com/uas/oauth/requestToken
com.google.code.linkedinapi.client.oauth.accessToken=https://api.linkedin.com/uas/oauth/accessToken
com.google.code.linkedinapi.client.oauth.authorize=https://www.linkedin.com/uas/oauth/authorize
com.google.code.linkedinapi.client.oauth.invalidateToken=https://api.linkedin.com/uas/oauth/invalidateToken
Run Code Online (Sandbox Code Playgroud)
当我改变上面的任何东西并创建jar时显示错误.
现在我显示了我的代码: -
void startAutheniticate() {
System.out.println("OAUTH_CALLBACK_URL " + OAUTH_CALLBACK_URL);
final LinkedInRequestToken liToken = oAuthService
.getOAuthRequestToken(OAUTH_CALLBACK_URL);
final String uri = liToken.getAuthorizationUrl();
getSharedPreferences(OAUTH_PREF, MODE_PRIVATE).edit()
.putString(PREF_REQTOKENSECRET, liToken.getTokenSecret())
.commit();
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(i);
}
void finishAuthenticate(final Uri uri) {
if (uri != null && uri.getScheme().equals(OAUTH_CALLBACK_SCHEME)) {
final String problem = uri.getQueryParameter(OAUTH_QUERY_PROBLEM);
if (problem == …Run Code Online (Sandbox Code Playgroud) 使用linkedin-j,我在我的应用程序的一部分中有以下代码
LinkedInOAuthService service = LinkedInOAuthServiceFactory.getInstance()
.createLinkedInOAuthService(consumerKey, consumerSecret);
LinkedInRequestToken requestToken =
service.getOAuthRequestToken(linkedinCallbackURL);
String authUrl = requestToken.getAuthorizationUrl();
Run Code Online (Sandbox Code Playgroud)
我重定向到指向的页面,authUrl并进入我授权我的应用程序的正确的LinkedIn页面.然后,生成指向的页面的代码linkedinCallbackURL将执行:
String verifier = request.getParameter("oauth_verifier");
LinkedInOAuthService oauthService =
LinkedInOAuthServiceFactory.getInstance()
.createLinkedInOAuthService(consumerKey, consumerSecret);
LinkedInRequestToken requestToken = oauthService.getOAuthRequestToken();
LinkedInAccessToken accessToken = oauthService
.getOAuthAccessToken(requestToken, verifier);
Run Code Online (Sandbox Code Playgroud)
不幸的是,我收到此错误:
com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceException:oauth.signpost.exception.OAuthCommunicationException:与服务提供商的通信失败:服务器返回HTTP响应代码:401为URL:https://api.linkedin.com/uas / OAuth的/的accessToken
引起:oauth.signpost.exception.OAuthCommunicationException:与服务提供者的通信失败:服务器返回HTTP响应代码:401为URL:https://api.linkedin.com/uas/oauth/accessToken
有什么不对?
我试图让连接或从用户的好友信息LinkedIn使用LinkedIn罐子中给出的Android和例如谷歌的代码,但我不会得到使用的连接linkedInApiClient.getConnectionsForCurrentUser()调用这个方法返回null,但我可以通过访问用户当前的个人资料信息linkedInApiClient.getProfileForCurrentUser()
任何机构都可以建议我如何在android 中的linkedIn中获取用户连接信息.或者引导我以正确的方式.