0
votes

This looks like an old problem, but I am hoping that there is a new solution.

I make the following call:

https://api.linkedin.com/v1/people/~/connections:(email-address,first-name,last-name,headline,picture-url;secure=true,public-profile-url,id)?count=%ld&start=%ld

where count is 100 and start is 0. I then look at the returned _total count, and if it is greater than the returned _count + _start, then I issue the above call again with a new value for _start = _count + _start.

My expectation is that eventually, _start + _count is equal to _total, and I can stop requesting connections. However, with each call, this is what I see:

03:30:44.540 Induco[3873:413590] LinkedIn returned: count 100, start 0, total 807
03:30:45.288 Induco[3873:413590] LinkedIn returned: count 100, start 100, total 807
03:30:46.045 Induco[3873:413590] LinkedIn returned: count 100, start 200, total 807
03:30:46.818 Induco[3873:413590] LinkedIn returned: count 100, start 300, total 807
03:30:47.501 Induco[3873:413590] LinkedIn returned: count 100, start 400, total 807
03:30:48.192 Induco[3873:413590] LinkedIn returned: count 100, start 500, total 807
03:30:48.899 Induco[3873:413590] LinkedIn returned: count 100, start 600, total 807
03:30:49.457 Induco[3873:413590] LinkedIn returned: count 83, start 700, total 807
03:30:49.686 Induco[3873:413590] LinkedIn returned: count 0, start 783, total 807
03:30:49.933 Induco[3873:413590] LinkedIn returned: count 0, start 783, total 807
03:30:50.196 Induco[3873:413590] LinkedIn returned: count 0, start 783, total 807
03:30:50.475 Induco[3873:413590] LinkedIn returned: count 0, start 783, total 807
03:30:50.873 Induco[3873:413590] LinkedIn returned: count 0, start 783, total 807
03:30:51.140 Induco[3873:413590] LinkedIn returned: count 0, start 783, total 807
03:30:51.379 Induco[3873:413590] LinkedIn returned: count 0, start 783, total 807
03:30:51.673 Induco[3873:413590] LinkedIn returned: count 0, start 783, total 807
03:30:51.943 Induco[3873:413590] LinkedIn returned: count 0, start 783, total 807

It seems that LinkedIn will not return some number of my connections, and I have no way of knowing that, and my app will continue to query the server endlessly (or until the throttle limit is reached).

As an experiment, I set the count value at 100000 and still get:

03:53:12.610 Induco[3931:437503] LinkedIn returned: count 783, start 0, total 807
03:53:12.910 Induco[3931:437503] LinkedIn returned: count 0, start 783, total 807

Again, I can't seem to get all 807 connections. My research indicates that LinkedIn may be withholding private connections from me, however, this doesn't seem to be the right way to do so, given that we are to rely on the count, start and total figures in order to know whether we should stop querying for more connections. And to make matters more confusing, there are returned connections where the first name, last name values, among others, are set to "private". Hello?

Has anyone run into this and resolved it?

1

1 Answers

0
votes

I guess the workaround is to keep asking and then stop when LinkedIn starts returning a 0 count.

Oh, LinkedIn, must you be so difficult?