Skip to content

Instantly share code, notes, and snippets.

@georgeportillo
Last active May 23, 2017 16:44
Show Gist options
  • Save georgeportillo/6a902e0b07137f3e2152da0494a89141 to your computer and use it in GitHub Desktop.
Save georgeportillo/6a902e0b07137f3e2152da0494a89141 to your computer and use it in GitHub Desktop.
================
Get started
================
{
"entry": [{
"id": "39067632506",
"time": 1489304167705,
"messaging": [{
"sender": {
"id": "1713278708698563"
},
"recipient": {
"id": "39067632506"
},
"timestamp":1458692752478,
"postback":{
"payload": "{\"event\":\"getStarted\"}",
"referral": {
"ref": "USER_DEFINED_REFERRAL_PARAM",
"source": "SHORTLINK",
"type": "OPEN_THREAD"
}
}
}]
}]
}
================
Quick reply that navigates to another intent
================
{
"entry": [{
"id": "39067632506",
"time": 1489304167705,
"messaging": [{
"sender": {
"id": "1713278708698563"
},
"recipient": {
"id": "39067632506"
},
"timestamp": 1458692752478,
"message": {
"quick_reply": {
"payload": "{\"intentId\":\"865d875d-b9dd-4d5a-a02c-74e82cb072d7\"}"
},
"mid": "mid.$cAABa-kLiB2NiCrVr_Fb2XAjkJlLl",
"seq": 818830,
"text": "Yes"
}
}]
}]
}
================
Quick reply that sets a choice
================
{
"entry": [{
"id": "39067632506",
"time": 1489304167705,
"messaging": [{
"sender": {
"id": "1713278708698563"
},
"recipient": {
"id": "39067632506"
},
"timestamp": 1458692752478,
"message": {
"quick_reply": {
"payload": "{\"response\":\"Well\"}"
},
"mid": "mid.$cAABa-kLiB2NiHPUkUVb66_b_H0s0",
"seq": "821582",
"text": "Well"
}
}]
}]
}
================
Quick reply that sets an action
================
{
"entry": [{
"id": "39067632506",
"time": 1489304167705,
"messaging": [{
"sender": {
"id": "1713278708698563"
},
"recipient": {
"id": "39067632506"
},
"timestamp": 1458692752478,
"message": {
"quick_reply": {
"payload": "{\"action\":\"joinRealtimeUpdates\",\"intentId\":\"cf026bb8-c68c-43d9-a018-a236fe1d9b3c\"}"
},
"mid": "mid.$cAABa-kLiB2NiHPUkUVb66_b_H0s0",
"seq": "821582",
"text": "Male"
}
}]
}]
}
================
Button tapped that navigates to another intent
================
{
"entry": [{
"id": "39067632506",
"time": 1489304167705,
"messaging": [{
"sender": {
"id": "1713278708698563"
},
"recipient": {
"id": "39067632506"
},
"timestamp": 1458692752478,
"postback": {
"payload": "{\"intentId\":\"8dde9e16-80e9-4a71-88e8-dfabc87504b1\"}"
}
}]
}]
}
================
Button tapped that sets a response
================
{
"entry": [{
"id": "39067632506",
"time": 1489304167705,
"messaging": [{
"sender": {
"id": "1713278708698563"
},
"recipient": {
"id": "39067632506"
},
"postback": {
"payload": "{\"response\": \"Yes, I do\"}"
}
}]
}]
}
================
Plain text message (handled by NLP)
================
{
"entry": [{
"id": "39067632506",
"time": 1489304167705,
"messaging": [{
"sender": {
"id": "1713278708698563"
},
"recipient": {
"id": "39067632506"
},
"timestamp": 1458692752478,
"message": {
"text": "George Portillo"
}
}]
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment