Unable to get distance sort and distance filter to work

10 posts / 0 new
Last post
Simon Grantham's picture
Joined: 11/17/2011
Thu, 02/16/2012 - 16:49
Unable to get distance sort and distance filter to work

I've been unable to get distance sort and filtering working at all. I'm requesting sort by distance and that I only want first and second degree connections.
What I get includes third and out-of-network connections and its not sorted.

Has anybody succeeded in this? Here's the URL and result, ("xxx..." replaces good but personally identifiable information)

URL
------
people-search:(people:(id,first-name,last-name,public-profile-url,site-public-profile-request:(url),relation-to-viewer:(distance)))?current-company=true&sort=distance&company-name=xxx+xxx+xxx&facet%3Dnetwork%2CF%2CS&start=0&count=4&format=json

Which is:
-------------
people-search:(people:(id,first-name,last-name,public-profile-url,site-public-profile-request:(url),relation-to-viewer:(distance)))?current-company=true&sort=distance&company-name=xxx xxx xxx&facet=network,F,S&start=0&count=4&format=json

Returns (extracted from json):
------------
'firstName' => '', 'id' => 'Txxxxxxxxx', 'lastName' => 'Private', 'relationToViewer' => 'distance' => -1
'firstName' => '', 'id' => 'Rxxxxxxxxx', 'lastName' => 'Private', 'relationToViewer' => 'distance' => -1
'firstName' => 'Mike', 'id' => '6xxxxxxxxx', 'lastName' => 'T.', 'relationToViewer' => 'distance' => 3, 'publicProfileUrl' => 'http://www.linkedin.com/pub/mike-t/xx/xx/xxx'
'firstName' => '', 'id' => 'kxxxxxxxxx', 'lastName' => 'Private', 'relationToViewer' => 'distance' => -1

Jeremy Johnstone's picture
Developer Advocate
Joined: 04/17/2011
Mon, 02/20/2012 - 02:08

Hi Simon,

I am not able to replicate this myself and I have tested it a number of ways with different users / company names. Can you post the full request headers / body you are sending to our servers? Maybe something is being encoded incorrectly by your OAuth library.

-Jeremy

Simon Grantham's picture
Joined: 11/17/2011
Wed, 02/22/2012 - 16:59

Thanks, here it is (I have only XX'ed out oauth_cosumer_key) (I picked a different target company this time, but results were similar, as in not sorted, not filtered):

GET /v1/people-search:(people:(id,first-name,last-name,public-profile-url,site-public-profile-request:(url),relation-to-viewer:(distance)))?current-company=true&sort=distance&company-name=North+Rim+Exploration&facet%3Dnetwork%2CF%2CS&start=0&count=15&format=json HTTP/1.0
Host: api.linkedin.com
Authorization: OAuth oauth_consumer_key="xxxxxxxxx",oauth_signature_method="HMAC-SHA1",oauth_nonce="2884445194f458cff8677b4.62270924",oauth_timestamp="1329958143",oauth_version="1.0",oauth_token="0690c512-bbca-404e-bc8c-cfe45e927156",oauth_signature="7KdkgkvN211vTdlGfLecBnYiwXQ%3D"

Simon Grantham's picture
Joined: 11/17/2011
Wed, 02/22/2012 - 17:02

BTW, I captured it directly, with wireshark.

Simon Grantham's picture
Joined: 11/17/2011
Sun, 02/26/2012 - 11:17

Jeremy, have you had a chance to look at this yet?

Thanks!

Jeremy Johnstone's picture
Developer Advocate
Joined: 04/17/2011
Mon, 02/27/2012 - 10:30

Hi Simon,

Just wanted to update you and let you know I haven't had a chance yet, but I hope to later today. Will keep you apprised on status.

-Jeremy

Simon Grantham's picture
Joined: 11/17/2011
Tue, 03/06/2012 - 16:26

Hey Jeremy, hope to hear an update when you can.

Simon

Simon Grantham's picture
Joined: 11/17/2011
Tue, 03/20/2012 - 17:57

Just wanted you to know that my multi-billion-dollar size end-client was convinced to settle for less given the simple problem of not having the API deliver useless PRIVATE contacts on searches or at least have you (linkedin) tell me what information I can get, at least, from private contacts to, at least, present something.

Kirsten Jones's picture
Joined: 06/30/2011
Wed, 03/21/2012 - 08:22

I'm sorry this is frustrating for you. At LinkedIn our members come first, and they own their data and can control who can use it. When users choose not to share their information with 3rd party applications, we cannot provide that information via the API.

Simon Grantham's picture
Joined: 11/17/2011
Thu, 03/22/2012 - 16:23

Absolutely, your linkedin members should come first. I have been merely suggesting that there is no point in delivering search results for people who do not want to share their information. Every 3rd party provider is going to have the same problem when searching contacts on the API, and, despite my immediate business sensibilities, I choose to compromise in the interests of getting a good working result.

The purpose of any third party search is to present relevant information. We can't store it, therefore we must present it (or do statistics). We have to present in reasonable bite sizes, say 30 or 40 listings, and the problem is there is no way to do that since an unknown %age will have nothing to display except "private". My measurements show that this number is regularly greater than 50%. The only solution for 3rd party providers is to pummel you with API calls to accumulate enough open contacts to satisfy any request but I have refused to take that approach with my client as it is the worst kind of solution.

The problem also exists for other 3rd Party providers that are doing statistics. They have to generate enough calls to sift out the 'private' to get any meaningful calculations.

Help me to filter out private.

Thanks