LinkedIn-J不返回教育



我正在使用LinkedIn-J。我的应用程序可以毫无问题地进行身份验证,我可以从用户那里获得数据,甚至是他们的名字、姓氏等。

Person profile = client.getProfileForCurrentUser();
profile.getFirstName();

但是,当我尝试获取教育列表时,返回的Educations对象是null:

Educations educations = profile.getEducations();
educations == null

可能是什么错误?我的申请是否应该要求授予特殊权限?

我以前从未使用过Linkedin-j api,但根据Linkedin api,默认情况下你会得到名字、姓氏、标题和一些url。

因此,我认为你需要明确表示你希望归还教育。不过,我不知道如何在LinkedIn-J中做到这一点。

http://developer.linkedin.com/documents/profile-api

例如,对于rest api,您将使用以下uri:

http://api.linkedin.com/v1/people/id=12345:(first-name,last-name, educations)

使用LinkedIn J库,您似乎必须使用Set作为参数将配置文件字段添加到客户端中的许多方法之一。

一个方法的例子,你可以调用许多(如果你有一个连接的用户):

public Person getProfileForCurrentUser(Set<ProfileField> profileFields)

ProfileField是位于此处的枚举:

import com.google.code.linkedinapi.client.enumeration.ProfileField;

最新更新