Groups API: site-group-post-url not returning correct URL

12 posts / 0 new
Last post
Jonny Olliff-Lee's picture
Joined: 07/19/2011
Tue, 08/16/2011 - 00:32
Groups API: site-group-post-url not returning correct URL

Hi everyone,

I've been working with the Groups API and I've stumbled across a rather annoying issue. The issue is with the site-group-post-url property of a Group. When I use this to create a link to a post from a Group, and then test that link, I'm taken to LinkedIn but get the following error:

"Sorry it seems there was a problem with the link you followed."

Effectively saying that the Group post I'm trying to link to doesn't exist or I have the wrong URI for it. I have access to the Group, and can access the relevant posts through the group page.

Is anyone else experiencing this issue or know what causes it?

Thanks,
Jonny

Martin Todorov's picture
Joined: 05/05/2011
Sun, 08/21/2011 - 13:25

Same here...
I'm putting as link the url for my group, but this isn't satisfying.

Joined: 02/09/2010
Wed, 08/24/2011 - 09:43

Yep, it is broken. My guess is the developer wrote the code, meant to check the names of the actual parameters, then forgot to.

Here's the elements that I get from the API:
anetID = group id
itemID = post id
itemType = member
trk = api*and some numbers

If I click the link for a post on LinkedIn, the parameters are slightly different:
view = empty
gid = group id
type = member
item = post id
trk = some junk
qid = some junk

I'm considering constructing the URL myself on my end, as the field returned by LinkedIn is garbage.

Kirsten Jones's picture
Joined: 06/30/2011
Wed, 08/24/2011 - 10:33

This is a known issue covered in the Groups API Documentation:

The post.site-group-post-url parameter uses the incorrect domain.
Workaround:Replace api.linkedin.com with www.linkedin.com.

Jeff McAdams's picture
Joined: 07/22/2011
Wed, 08/24/2011 - 12:36

Can anyone point me to a site that is using this API

Joined: 08/30/2011
Thu, 09/01/2011 - 20:39

It seems like it is still a broken link even i replace api with www . Is there any work around? Thanks

Joined: 10/31/2011
Mon, 11/07/2011 - 04:34

I have joined a group. Using group API I have posted something onto my group by using my group ID. My post was successful. I have to make use of that post ID for another purpose. But after posting I am not getting the post ID of my post. Can anybody please tell me how to get Post ID.

Thanks in Advance.

Kirsten Jones's picture
Joined: 06/30/2011
Tue, 11/08/2011 - 17:44

When you send a post, the response comes back with a "location" for the post itself (this is not the case for moderated groups, where the post ID is not yet known):

{'status': '201', 'content-length': '0', 'vary': 'Accept-Encoding', 'server': 'Apache-Coyote/1.1', 'location': 'http://api.linkedin.com/v1/posts/g-4058745-S-79463880', 'date': 'Wed, 09 Nov 2011 01:43:50 GMT'}

Will Redd's picture
Joined: 09/26/2011
Wed, 02/15/2012 - 13:18

Hi Kirsten,

Is there a way to determine if a group is moderated via the API? I don't see anything obvious in https://developer.linkedin.com/documents/groups-fields , but perhaps I'm missing something.

We have a similar issue (described in https://developer.linkedin.com/forum/how-should-http-202-accepted-response-be-handled-groups-posting-api) where it appears that we are unable to move our posts to the jobs section of a group if that group is moderated. If we could determine which groups were moderated, we could avoid posting to those groups. Of course the ideal solution would be to enable direct posting to the jobs section or at least return the post ID for all groups.

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

Hi Will,

I'm not seeing anything myself when looking. I'll ping Kirsten next week and see if she has any ideas.

-Jeremy

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

There is no way to tell whether a group is moderated via the API - all I can say is that if you get a 202 that's likely the case and you can code for that specific case.

Jeremy Johnstone's picture
Developer Advocate
Joined: 04/17/2011
Tue, 02/28/2012 - 18:57

Hi All,

As I am told, the only case where you get a 202 response, *at this time* anyway, is with a moderated group, so I would suggest following the route Kirsten recommends above and code against that being true.

-Jeremy