Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fetch a group object with Graph API using group alias?

How can i fetch data with group page alias ?

Take for example this group: http://www.facebook.com/groups/toroneradio/. Making request to https://graph.facebook.com/toroneradio gives me back:

"message": "(#803) Some of the aliases you requested do not exist: toroneradio"

Making request to the graph API with the group's id: https://graph.facebook.com/173246339390721 works OK.

It works great for pages though. Looked at FQL groups table but name is not searchable. (FQL Groups table) Also looked for some documentation and in FB bugtracking, couldn't find anything.

Is there way to get programaticly the group id from group alias or directly to get Group graph object?

Thanks, in advance!

like image 304
sensor Avatar asked Oct 10 '22 01:10

sensor


1 Answers

The Easy Way

  1. If you haven't done so, join the Facebook group which you want to fetch the group ID
  2. Use the Facebook Graph API explorer
  3. Access your list of groups via http://graph.facebook.com/me/groups
  4. Search for the group and the ID will be listed in the object

If you are doing it through your Facebook application, all you need is to grab an FB access token before you do the FB Graph API call (read up the documentation here, especially the Authorization section)

The Hard Way

In case the easy way doesn't work (or if you feel iffy in joining the group), here's the sure-fire way to do so:

  1. Start up Firebug and enable the "Net" tab
  2. Bring up Facebook - check that the Net panl will show all the HTTP requests that's happening
  3. Click the "Clear" button so that you have the panel in the blank slate
  4. Click on the link of the Facebook group that you wanted to retrieve the Facebook ID
  5. Look out for a GET request to generic.php - that would be the very first request, but hunt it down if it's not. Click on the [+] box to expand the details
  6. Click on the "Parameters" tab and you'd see a key-value dictionary of the request. There'll be two fields in there called "key" and "sk", both of which would carry the same value like "group_1656399367890"
  7. The group's ID will be the numeric value after "group_" (in this case, it'll be 1656399367890)

Hope that helps!

like image 116
Seh Hui Leong Avatar answered Oct 18 '22 07:10

Seh Hui Leong