Common Uses

A proposed change may or may not have a deadline. To see all proposed changes, regardless if they have a deadline or not, query the change_proposals edge. To query all proposed changes with a deadline use the upcoming_changes edge. This query will show the date and time when the change will occur and the proposed change. The change_proposals edge will not show deadlines.

Getting Information about Upcoming Changes with Deadlines

Webhooks Notification Example

Subscribe to the page_upcoming_change and/or the page_change_proposal Page Webhook for your app.

Sample Webhook Request of page_upcoming_change

curl -F "object=page" \
     -F "callback_url=your-callback-url" \
     -F "fields=page_upcoming_change" \
     -F "verify_token=your-verify-token" \
     -F "access_token=your-app-access-token" \
     "https://graph.facebook.com/your-app-id/subscriptions"

Sample Webhook Response of page_upcoming_change

{
  "field": "page_upcoming_change",
  "action": "pending", // can also be accepted_manually, accepted_automatically and rejected_manually
  "value": {
    "id": "123456", // id of upcoming change
    "page": {
      "id": "7878832", // id of page where the action is taken
      "name": "page name"
    },
    "effective_time": "2017-03-01 12:00:00",
    "change_type": "knowledge_proposal",
    "timer_status": "active",
    "proposal": {
      "id": "id of the page change proposal",
      "category": "menu link",
      "acceptance_status": "pending", // can also be accepted or rejected
      "current_value": "https://www.oldmenu.com/",
      "proposed_value": "https://www.newmenu.com/"
    }
  }
}

See the Pages Webhooks Guide for more information about Webhooks.

Proposal Status Sample Request

Get a quick view of all your proposals. These include pending, accepted, and rejected.

Sample Webhook Response of page change proposal

{
  "field": "page_change_proposal",
  "action": "created",
  "value": {
    "id": "12345678",
    "category": "menu link",
    "current_value": "https://www.menuold.com/",
    "proposed_value": "https://www.menunew.com/",
    "acceptance_status": "pending"
  }
}

Sample Request of page_change_proposal

GET graph.facebook.com/page-id/upcoming_changes
  ?fields=proposal{acceptance_status}

Sample Response

{
  "data": [
    {
      "proposal": {
        "acceptance_status": "pending",
        "id": "1687992851268553"
      },
      "id": "1687992854601886"
    },
    {
      "proposal": {
        "acceptance_status": "accepted",
        "id": "1687992851268553"
      },
      "id": "1687992854601886"
    },
    {
      "proposal": {
        "acceptance_status": "rejected",
        "id": "1687992851268553"
      },
      "id": "1687992854601886"
    }
  ]
}

Upcoming Changes Sample Request

Get an indepth view of proposed changes including the current value and the proposed value and whether it was automatically accepted, already_fired, or accepted/rejected by admins, stopped, through the UI or API.

GET graph.facebook.com/page-id/upcoming_changes
  ?include_inactive=true

Sample Response

{
  "data": [
    {
      "id": "1577612075639965",  //id of proposed change
      "page": {
        "name": "My Page",
        "id": "937132923021220"   //page id for which the change was proposed
      },
      "effective_time": "2017-10-16T10:19:49+0000",
      "timer_status": "stopped",           //this proposal was accepted/rejected by an admin
      "change_type": "knowledge_proposal",
      "proposal": {
        "id": "1570719759662530",
        "category": "category",
        "current_value": "273819889375819, 161516070564222, 152142351517013",
        "proposed_value": "273819889375819, 161516070564222, 152142351517013, 273819889375819"
      }
    },
    {
      "id": "1609624059105433",
      "page": {
        "name": "My Page",
        "id": "937132923021220"
      },
      "effective_time": "2017-11-21T07:03:54+0000",
      "timer_status": "already_fired",   //this proposal was automatically accepted
      "change_type": "knowledge_proposal",
      "proposal": {
        "id": "1603101113091061",
        "category": "category",
        "current_value": "273819889375819, 161516070564222, 152142351517013",
        "proposed_value": "273819889375819, 161516070564222, 152142351517013, 273819889375819",
        "acceptance_status": "accepted"
      }
    }
  ]
}

Sample Request Accepting a Change

POST graph.facebook.com/proposal-id
       ?accept=true

Sample Request Rejecting a Change

POST graph.facebook.com/proposal-id
       ?accept=false

Sample Response

{
  "succeed": true
}