Inconsistent comment count for network updates

5 posts / 0 new
Last post
Vivek Shah's picture
Joined: 12/09/2011
Sun, 02/19/2012 - 22:00
Inconsistent comment count for network updates

Hi,
We are trying to display the Linked in network updates in our page and have run into following 2 issues

1) The comment count (under the total field) sometimes gives the count comprising of deleted comments as well. But when we actually
check on the Linked in Website , it shows the current comment count.

2) When we explicitly call api (http://api.linkedin.com/v1/people/~/network/updates/key=XXXXXXXX/update-comments",null)to fetch the total comments for the post Id ( as we have a view more option in our page), the comment xml is returned as empty. But the initial call to get the network updates (http://api.linkedin.com/v1/people/~/network/updates?type=SHAR&type=CONN&count=50&start=0) along with the comments returned us the initial set of comments for the respective posts.

Thanks,
Vivek

Kirsten Jones's picture
Joined: 06/30/2011
Wed, 02/22/2012 - 09:13

In order to help you debug this, we need to see exactly the calls you're making (the HTTP calls, not the calls within your library - for instance, the "null" indicates that you're passing something to the library).

Please take a look at Debugging API Calls to see what information we need to help with this.

Thanks,
Kirsten

Vivek Shah's picture
Joined: 12/09/2011
Sun, 02/26/2012 - 23:29

Hi,
Thanks for letting us know. We did try to debug the flow and could reproduce the problem in the following way

Step 1) Fetched the network updates using Oauth console with the following generated url
http://api.linkedin.com/v1/people/~/network/updates?count=50&oauth_consumer_key=jr2btw4f85fr&oauth_nonce=1234&oauth_signature=TiI%2Fj0HimKRheen8gq8A76jfLi0%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1330326046&oauth_token=afb27de4-f46c-41ee-909f-bb351e673c09&oauth_version=1.0&start=0&type=PICT&type=SHAR .
For a particular UpdateKey- 'UNIU-33947603-5577250436135526400-SHARE' , the total comment count was in sync with what we
received using url to get comments for a particular update using the url http://api.linkedin.com/v1/people/~/network/updates/key=UNIU-33947603-5577250436135526400-SHARE/update-comments?oauth_consumer_key=jr2btw4f85fr&oauth_nonce=1234&oauth_signature=B1k0oZGDsW4DKgdg%2BvGtLGDnj2I%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1330325289&oauth_token=afb27de4-f46c-41ee-909f-bb351e673c09&oauth_version=1.0

Step 2) Now we deleted all the comments except one for that post being on the Linked In site . And then we again request network updates for the user using the Oauth console, the total comment section for the update key UpdateKey- 'UNIU-33947603-5577250436135526400-SHARE' is not visible which seems inconsistent as there is still one comment for that post (http://screencast.com/t/UnZmP5oLmX). Besides when we try to retrieve the comments for that update key separately through http://api.linkedin.com/v1/people/~/network/updates/key=UNIU-33947603-5577250436135526400-SHARE/update-comments?oauth_consumer_key=jr2btw4f85fr&oauth_nonce=1234&oauth_signature=YRNvW8bGqxBk9xqwyGogT%2FsqZFw%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1330327014&oauth_token=afb27de4-f46c-41ee-909f-bb351e673c09&oauth_version=1.0 , it shows the
total count is 8 and the count shows as 1 (http://screencast.com/t/sA5kpAQwgE)

Please let me know if I am not clear.

Regards,
Vivek

Kirsten Jones's picture
Joined: 06/30/2011
Mon, 02/27/2012 - 07:12

There is some amount of caching on the network update server, and sometimes the servers can be out of sync for a while. Is it still the case that making the request via the oauth console for that update is giving a different response than making the request from your server?

Vivek Shah's picture
Joined: 12/09/2011
Mon, 02/27/2012 - 21:48

Hi,
The network updates fetch from the oauth console and from our server seems to be in sync. But the inconsistency flow which I mentioned in detail (from the oauth console) can be simulated again from our server when we call the Linked In api. Please let me know
if you need any more info.

Thanks,
Vivek