This guide explains the step to take to get started using the Groups API.
You need the following:
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.
curl -i -X GET \ "https://graph.facebook.com/{user-id}/groups"
{ "data": [ { "name": "Heather's Tupperware", "id": "871704662996313" }, { "name": "Team Loomer", "id": "244471929349963" }, { "name": "Wild Horses", "id": "146797922030397" }, ], "id": "268045640633085" }
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.
curl -i -X POST "https://graph.facebook.com/{group-id}/feed &fields=message=I%20love%20this%20group!" &access_token=EAACEdEos0..."
{ "id": "554611227955614_1708186035931455" //the group post ID }