Graph API Version

Group Doc /{group-doc-id}

Represents a doc within a Facebook group. The /{group-doc-id} node returns a single doc.

Reading

Graph API Explorer
GET /v2.10/{group-doc-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{group-doc-id}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{group-doc-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{group-doc-id}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{group-doc-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

  • Any valid access token if the group is public (i.e. the group's privacy setting is OPEN)
  • user_managed_groups permission to retrieve docs from any groups that the session user is an admin of.
  • App and game groups require an app access token to retrieve any docs.

Fields

Property NameDescriptionType

id

The group doc ID.

string

from

The profile that created this doc.

User|Page

subject

The title of the doc.

string

message

The body of the doc. This string will contain HTML for any formatting in the doc, and will be HTML encoded.

string

icon

The URL for the doc's icon

string

created_time

When the doc was created.

datetime

updated_time

The last time the doc was changed.

datetime

revision

An ID representing the current doc revision.

int

can_edit

Whether the session user can edit this doc.

boolean

can_delete

Whether the session user can delete this doc (on Facebook.com).

boolean

Publishing

You cannot create docs via the Graph API.

Deleting

You cannot delete docs via the Graph API.

Updating

You cannot update docs via the Graph API.