Jump to: navigation, search

Send

This operation is part of the Facebook API section of the Web Services API.

Overview

Sends a Facebook message to the specified Facebook account.

Request URL /api/v2/me/facebook/{id}
HTTP Method POST
Required Features api-multimedia

Parameters

Parameter Value
operationName Send
queuePath The job queue for handling the Send operation. (mandatory)
facebook Specified data that includes the Facebook parameters. (mandatory)
saveLAR Possible values are true or false. If true, information about the agent performing the operation is set in the Contact Profile so that it can be used for last agent routing. (optional)

Facebook Parameters

Parameter Value
from A user name for a Facebook account.
message The actual message to send. The body should be plain text.

Samples

Request

POST api/v2/me/facebook/01QQQG2MU214P06D
  {
    "queuePath": "/contacts/60ebbb94-3cef-4b14-95f8-5c49dbeb355d",
    "facebook": {
        "message": "Hello Facebook!",
        "from": "vitaliy_onv"
    },
    "operationName": "Send"
  }

HTTP Response

{
  "statusCode": 0,
  "referenceId": 57
}

CometD Response

{
"facebook": {"capabilities": [],
                "contactId": "00029aAGQP53000S",
                "facebookType": "Outbound",
                "id": "01QQQG2MU214P06D",
                "message": "Hello Facebook!",
                "state": "Sent",
                "subject": "Hello Facebook!",
                "uri": "http://192.168.83.25:8090/api/v2/facebooks/01QJV4TN9HUF4006",
                "userData": {"_facebookActorId": "1010528695643593",
                              "_facebookActorNickName": "Vitaliy Onischenko",
                              "_facebookActorObjectType": "com.genesyslab.mcr.facebook.fql.User",
                              "_facebookActorXML": "<com.genesyslab.mcr.facebook.fql.User>[xml with facebook actor description]</com.genesyslab.mcr.facebook.fql.User>",
                              "_facebookSourceId": "449156051903439",
                              "_facebookSourceNickName": "Cloud App HTCC",
                              "_facebookSourceObjectType": "com.genesyslab.mcr.facebook.fql.Page",
                              "_facebookSourceXML": "<com.genesyslab.mcr.facebook.fql.Page>[xml with facebook page description]</com.genesyslab.mcr.facebook.fql.Page>",
                              "_facebookSubmitType": "post",
                              "desktop_AgentEmployeeId": "a1"}},
  "messageType": "FacebookStateChangeMessage",
  "notificationType": "StatusChange",
  "referenceId": 29
}
This page was last edited on January 22, 2016, at 19:56.
Comments or questions about this documentation? Contact us for support!