Get Started

This guide explains the step to take to get started using the Groups API.

Before You Start

You need the following:

  • Your app must be installed on the Group

Step 1. Get a Group ID

Send a GET request to the /{user-id}/groups endpoint to get a list of Groups for which a User who has granted your app permission to do so.

Sample Request

curl -i -X GET \ 
  "https://graph.facebook.com/{user-id}/groups"

Sample Response

{
  "data": [
    {
      "name": "Heather's Tupperware",
      "id": "871704662996313"
    },
    {
      "name": "Team Loomer",
      "id": "244471929349963"
    },
    {
      "name": "Wild Horses",
      "id": "146797922030397"
     },
  ],
  "id": "268045640633085"
}

Step 2. Post On A Group

Send a POST request to the /{group-id}/feed endpoint to publish content on a Group on behalf of a group member who has granted your app permission to do so.

Sample Request

curl -i -X POST "https://graph.facebook.com/{group-id}/feed
  &fields=message=I%20love%20this%20group!"
  &access_token=EAACEdEos0..."

Sample Response

{
 "id": "554611227955614_1708186035931455"  //the group post ID
}