I find I will need to use the relation-to-viewer:(related-connections) in my js code, but how can I do that? A simple sample code would be appreciated.Thanks!
- Log in to post comments
I find I will need to use the relation-to-viewer:(related-connections) in my js code, but how can I do that? A simple sample code would be appreciated.Thanks!
Thanks Kirsten.BTW, would you please show me how to use relation-to-viewer:(related-connections)? I triedIN.API.Raw('/people-search:(people:(first-name,last-name,headline,distance,relation-to-viewer:(related-connections),picture-url,public-profile-url))?distance=1')It returns my info and my connections, something like the following
{"people": {"values": [{"headline": "xxxx","publicProfileUrl": "url link","lastName": "Dagou","distance": 0,"pictureUrl": "image link","firstName": "Bill","relationToViewer": {}},{"headline": "xxxx","publicProfileUrl": "url link","lastName": "last name","distance": 1,"pictureUrl": "image link","firstName": "first name","relationToViewer": {}},
..... ],"_count": 10,"_start": 0,"_total": 110}}
I could ignore my info by code for sure, but the relationToViewer field shows empty which is weird I think. Shouldn't it be something like
"relationToViewer": { "people": { "values": [ {the connections from my friends}, .... ] }}
That's odd. Can you take a look at this example page and see what you get in the alert?http://developer.linkedinlabs.com/tutorials/testing.html
i just wanted to get the connections on company in my network....the code iam using is...
IN.API.PeopleSearch()
.fields('id', 'firstName', 'lastName', 'distance', 'positions:(title)',
'public-profile-url', 'picture-url', 'relation-to-viewer:(related-connections)')
.params({
'company-name': 'Apple',
'current-company': true,
})
.result(displayMyConnections);
in this i wanted to use FACTS firstdegree and second degree...
can some body helpme out with example....
I mean, I try to get the people who works in the company, and also the related connections to this person. IN.API.PeopleSearch() .fields('firstName', 'lastName', 'headline', 'distance', 'relationToViewer', 'pictureUrl', 'publicProfileUrl') .params({'company-name': 'COMPANY NAME', 'count': 2, 'sort': 'distance'}) .result(function(result)the relationToViewer only returns the distance. If I'd like to get the related-connections, how should I do?