我正在使用LinkedIn-J。我的应用程序身份验证没有问题,我从用户那里获得数据-甚至是他们的名字、姓氏等。
Person profile = client.getProfileForCurrentUser();
profile.getFirstName();但是,当我尝试获取教育列表时,返回的Educations对象是null
Educations educations = profile.getEducations();
educations == null可能的错误是什么?我的应用程序是否应该请求授予特殊权限?
发布于 2012-03-29 06:50:18
我以前从未使用过Linkedin-j,但根据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;https://stackoverflow.com/questions/9916711
复制相似问题