我利用链接联系我的申请。 我需要用户Id、脚本和肯特。 我拿到了两条灯塔,但我可以拿到目前用户的id子!
电话:p.getId();
寄给我一 null。
我的守则如下:
String verifier = intent.getData().getQueryParameter("oauth_verifier");
LinkedInAccessToken accessToken = oAuthService.getOAuthAccessToken(liToken, verifier);
client = factory.createLinkedInApiClient(accessToken);
client.postNetworkUpdate("LinkedIn Android app test");
Person p = client.getProfileForCurrentUser();
System.out.println("TEST "+client.getProfileForCurrentUser());
System.out.println("Token "+accessToken.getToken());
System.out.println("Secret "+accessToken.getTokenSecret());
System.out.println("NOM "+p.getLastName() + ", PRENOM" + p.getFirstName());
Person profile = client.getProfileForCurrentUser(EnumSet.of(ProfileField.FIRST_NAME, ProfileField.LAST_NAME, ProfileField.CERTIFICATIONS_ID));
//System.out.println("IDDDDD"+profile.getId());
Connections connections = client.getConnectionsForCurrentUser();
System.out.println("Total connections fetched:" + connections.getTotal());
for (Person person : connections.getPersonList()) {
System.out.println(person.getId() + ":" + person.getFirstName() + " " + person.getLastName() + ":" + person.getHeadline());
}
帮助! 感谢!