0

When I GET /{group-id}?fields=link I get just get back {group-id}, rather than a full URL like in the case of /{album-id}?fields=link, /{photo-id}?fields=link, etc. Sample request and response for a group:

GET /v2.5/1685218945065439?fields=link
{
  "id": "1685218945065439"
}

whereas an album looks like this:

GET /v2.5/1685219628398704?fields=link
{
  "link": "https://www.facebook.com/media/set/?set=oa.1685219628398704&type=1",
  "id": "1685219628398704"
}

According to the docs link is a valid field on the Group object. I'm using a token that has user_managed_groups. I see the same result when querying OPEN and CLOSED groups.

Just looking at the URLs of my groups by loading them in my web browser, I see that they all use the format https://www.facebook.com/groups/{group-id}/, so it's easy enough to build a URL from the {group-id}, but is that URL format something I can actually count on?

Using Graph API v2.5.

mgalgs
  • 15,671
  • 11
  • 61
  • 74
  • 1
    Description of the field in docs says, “the group's website” – not sure what that means exactly, if it refers to the name you can set to have your group reachable via facebook.com/groups/mygroupname, or something else. But I don’t see a link value returned for any of the groups I’m a member of, and some of those definitively have those names set. Suggest you file a bug report, and ask them for clarification, resp. to fix it. https://developers.facebook.com/bugs – CBroe Apr 08 '16 at 07:51

2 Answers2

1

This is a field that is kept around for historical reasons. Back in the day you were able to actually set a website for a group, for example https://example.com.

This functionality has since been removed from the UI on facebook.com but the field in the API is present as older groups might have this value set, but newer groups won't have it anymore.

There has been a bug report about this as well which has been closed as 'By Design' for the reasons mentioned above https://developers.facebook.com/bugs/1495489670770155/

Björn Kaiser
  • 9,882
  • 4
  • 37
  • 57
  • Yeah I actually filed a bug report over there but forgot to update this post. Let me do that now... Thanks for the info. – mgalgs Apr 17 '16 at 23:20
0

I filed a bug report to which the Facebook team responded that this is the intended behavior (also noted by Bjorn in his answer). See Bjorn's answer for more details.

The good news is that, according to the Facebook dev on that bug report, the format of the Group URL will always be https://www.facebook.com/groups/GROUP_ID, so there's really no need to query the API for the Group URL anyways.

mgalgs
  • 15,671
  • 11
  • 61
  • 74