Этот документ обновлен.
Перевод (Русский) еще не готов.
Последнее обновление (английский): 1 авг
Последнее обновление (Русский): 29 ноя 2023 г.

Workplace from Meta is going away. You will be able to continue using Workplace until 31 August 2025. Visit our Help Center to find out more.

Community

Path /community

Alternative path /company

Represents your Workplace community. The /community node (or /company, which works interchangeably) returns a single community object of type Group. For API convenience, you can think of the root community object as a root Group for the other groups or communities.

You can find your Community ID by making a Graph API GET call to graph.facebook.com/community with a custom integration access token.

In some cases, a root community can also contain other communities, which will be appear on the /groups edge of the root community. Child communities of a root community can be distinguished from child groups by the is_community field.

The existance of one or more communities inside a root community identifies that this Workplace instance is community-enabled.

These child communities can be queried in turn on their /groups edge to get the groups within that community. In all cases the /groups edge will only show direct descendants of that community; recursion will not be performed.

Communities cannot be created via the API, but members can be managed in the same way as group members are.

Reading

GET graph.facebook.com
  /community

Permissions

The community node requires either Read group content or Manage Groups permission.

Publishing

You can't publish a Workplace community using this node.

Deleting

You can't delete a Workplace community using this node.

Updating

You can't update a Workplace community using this node.

Edges

NameDescription

/accounts

Use this edge to create/deactivate/delete accounts in a Workplace Community. Provision User Accounts permission is required for this edge

/admins

The System Administrators of a Workplace community. Manage Accounts permission is required for this edge

/badges

The list of available badges

/events

The events of a Workplace community.

/former_members

The former members of a Workplace community, whose accounts are now deactivated.

/groups

The groups and sub-communities in a Workplace community.

/knowledge_library_categories

The list of root level categories

/knowledge_quick_links

The list of links for frequently used tools and other resources within Knowledge Library

/members

The members of a Workplace community. Filterable on users' external IDs using the external_ids parameter

/reported_content

The list of reported content items for community admins to review. Please note that this edge was deprecated on April 30, 2019.

/skills

The list of skills that can be added to members' profiles in this community.

Examples

Creating a New Group

You can create a new group for a Workplace community by making a POST request to the /community/groups edge. The response will contain the ID of the newly-created group. Note that in order for your group to show any members, you must add at least one member and make the member an admin.

POST graph.facebook.com
  /community/groups?
    name={...}&
    description={...}&
    privacy=OPEN

Get a list of all groups and communities for a root community:

GET graph.facebook.com
  /community/groups?fields=is_community

Get a list of all members for a root community:

GET graph.facebook.com
  /community/members

Get a list of all members for a root community, filtering on external_id:

GET /community/members?
  external_ids=12356,abc123

Report an item of content (Please note this edge was deprecated on April 30, 2019):

POST graph.facebook.com
  /community/reported_content?
    content_id={...}

Add a new group to a root community:

POST graph.facebook.com
  /community/groups?
    name={...}&
    description={...}&
    privacy=OPEN

Add a new group to a non-root community:

POST graph.facebook.com
  /{community-id}/groups?
    name={...}&
    description={...}&
    privacy=OPEN

Provision an account:

POST graph.facebook.com
  /community/accounts?
    name={...}&
    email={...}&
    department={...}&
    division={...}&
    organization={...}&
    title={...}&
    manager={...}&
    hire_date={...}&
    invite={...}&
    active={...}

Updates to an account require the Manage Work Profiles permission and should use the following endpoint

POST /{member-id}

Further information available on the Account Management page.

List available badges:

This requires Manage badges permission

GET graph.facebook.com
  /community/badges?fields=id,name,description,icon,category

List the root level categories:

This requires Read Knowledge Library content permission

GET graph.facebook.com
  /community/knowledge_library_categories

Publish a new root level category:

This requires Manage Knowledge Library content permission .More details on values for each field is provided here.

POST graph.facebook.com
  /community/knowledge_library_categories?
  title={...}&
  icon={...}&
  color={...}&
  json_content={...}

List the links for frequently used tools and other resources within Knowledge Library:

This requires Read Knowledge Library content permission

GET graph.facebook.com
        /community/knowledge_quick_links?fields=title,link

Read a specific quick link in Knowledge Library

This requires Read Knowledge Library content permission

GET graph.facebook.com
        /{quick_link_id}?fields=title,link

Add a new quick link in Knowledge Library

This requires Manage Knowledge Library content permission

POST graph.facebook.com
        /community/knowledge_quick_links?
        title={...}&
        link={...}

Update a specific quick link in Knowledge Library

This requires Manage Knowledge Library content permission

POST graph.facebook.com
        /{quick_link_id}?
        title={...}&
        link={...}

Delete a specific quick link in Knowledge Library

This requires Manage Knowledge Library content permission

DELETE graph.facebook.com
        /{quick_link_id}