Jump to: navigation, search

CometD notifications

You can subscribe to the /v2/me/facebook topic to receive CometD notifications for the Facebook API. This topic provides messages related to Facebook interactions, including changes to Facebook interaction state and updates to Facebook interaction data. It supports the following message types:

FacebookStateChangeMessage

Property Description
data The data element is present in all CometD notifications and is the root JSON element. You can use data.messageType to identify the message and determine what other properties should be present.
data.messageType This property identifies the message type, in this case FacebookStateChangeMessage.
data.notificationType This property further identifies the type of notification and can have one of the following values:
  • StatusChange — The status of the facebook interaction has changed.
  • PropertiesUpdated — The facebook data has changed.
  • FacebookSaved — The facebook interaction has been saved.
  • Error — This is sent when an operation on the facebook resource fails.
data.facebook A facebook resource with the updated state and capabilities.
data.referenceId The reference identifier is used to link the notification to the original request that created it.

Example

{  
   "data":{  
      "facebook":{  
         "accounts":{},
         "capabilities":[  
            "Reply",
            "Transfer",
            "AddComment",
            "AttachUserData",
            "UpdateUserData",
            "DeleteUserData",
            "SetDisposition",
            "SetInFocus",
            "Complete"
         ],
         "contactId":"0000Ga95CENS017Y",
         "facebookType":"Inbound",
         "fqlObject":{},
         "from":"Labuprofen",
         "id":"01QN0QJNKK73603J",
         "receivedDate":"2015-07-16 10:22:05.000+0300",
         "revelantResponseTemplateGroups":[],
         "state":"Processing",
         "subject":"On 12:15:1 11/5/2013, P created a fac...",
         "suggestedQueueUris":[  
            "http://192.168.83.25:8090/api/v2/queues/20488dbc-6206-4150-8321-83b077e5a29e"
         ],
         "uri":"http://192.168.83.25:8090/api/v2/facebooks/01QN0QJNKK73603J",
         "userData":{  
            "_facebookActorId":"152879074923372",
            "_facebookActorIdType":1,
            "_facebookActorName":"Labuprofen",
            "_facebookCanComment":1,
            "_facebookComments":None,
            "_facebookContentCreatedOnlyByAdmin":1,
            "_facebookCreatedTime":"1383646506"
         }
      },
      "messageType":"FacebookStateChangeMessage",
      "notificationType":"StatusChange",
      "referenceId":107
   }
}
This page was last edited on March 25, 2016, at 18:23.
Comments or questions about this documentation? Contact us for support!