get Facebook Group Id using identifier or url

Prabhu picture Prabhu · Sep 26, 2013 · Viewed 8.9k times · Source

I would like to get a facebook group id by using a URL or specific identifier.

For ex: http://www.facebook.com/groups/chennaifoodies/ should give group id 194462073956868. Is there way to get the group id by using above URL or identifiers like 'chennaifoodies'?

If I tried https://graph.facebook.com/chennaifoodies, then it gives the fan page id.

I think 'wallflux' has done a wonderful script, so I need a script like that to get group the id.

is there any way to get a group id using graph api or fql?

Thanks.

Answer

Sahil Mittal picture Sahil Mittal · Sep 26, 2013

I don't think you can get the Group ID from the url you mentioned with the group username.

But, you surely can get the same with the url:

http://graph.facebook.com/search?q=chennaifoodies&type=group&access_token=ACCESS_TOKEN

Yes, you'll be needing an active user access token to query this.

Or, the graph API (the same thing)-

/search?q=chennaifoodies

Demo