Linkedin Api: Get Groups I am a Member Of

…衆ロ難τιáo~ 提交于 2019-12-13 18:13:37

问题


I want to get all the groups I'm memeber of the linkedin API. I use JavaScript SDK for this:

<head> 
<script type="text/javascript" src="//platform.linkedin.com/in.js">
  api_key:   77iju32v9t2i18
  onLoad:    onLinkedInLoad
  authorize: true   
</script> 
<script type="text/javascript">     
// Setup an event listener to make an API call once auth is complete
function onLinkedInLoad() { 
    IN.Event.on(IN, "auth", getGroupsData);
}  
function onSuccessGroup(data) {
    console.log(data);
} 
function onError(error) {
    console.dir(error);     
}

// Use the API call wrapper to request the member's basic profile data
function getProfileData() {
    IN.API.Raw("/people/~").result(onSuccess).error(onError);
}
function getGroupsData() {
    IN.API.Raw("/people/~/group-memberships:(group:(id,name))?membership-state=member").result(onSuccessGroup).error(onError);
}

In the last function getGroupsData() I queried the url: "/people/~/group-memberships:(group:(id,name))?membership-state=member" from here but it issued the error:

XHR finished loading: GET "https://api.linkedin.com/v1/people/~/group-memberships:(group:(id,name))?membership-state=member"

errorCode: 0 message: "Access to group-memberships denied" requestId: "BEVJ2X6T7J" status: 403 timestamp: 1434439902873 __proto__: Object

What's missing, how to configure request group url?


回答1:


According to the new developer program

If your application is currently using any other API services (e.g. Connections, Groups, People Search, Invitation, Job Search, etc.) you will have to apply to become a member of a relevant Partner Program that provides the necessary API access to continue to leverage any of the endpoints that are not listed above.

More info: https://developer.linkedin.com/support/developer-program-transition#troubleshooting



来源:https://stackoverflow.com/questions/30862230/linkedin-api-get-groups-i-am-a-member-of

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!