Skip to content

tusharkanakagiri/messenger-platform-samples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Things we learnt building this project

Useful post calls to add features to a facebook bot.

  • To add a gettig started button
curl -X POST -H "Content-Type: application/json" -d '{
  "setting_type":"call_to_actions",
  "thread_state":"new_thread",
  "call_to_actions":[
    {
      "payload":"USER_DEFINED_PAYLOAD"
    }
  ]
}' "https://graph.facebook.com/v2.6/me/thread_settings?access_token=PAGE_ACCESS_TOKEN"

  • To revalidate webhook
curl -X POST "https://graph.facebook.com/v2.6/me/subscribed_apps?access_token=PAGE_ACCESS_TOKEN"
  • To add a persistent menu
curl -X POST -H "Content-Type: application/json" -d '{
  "setting_type" : "call_to_actions",
  "thread_state" : "existing_thread",
  "call_to_actions":[
    {
      "type":"postback",
      "title":"I want to talk",
      "payload":"getStartedTalk"
    },
    {
      "type":"postback",
      "title":"I want to act",
      "payload":"getStartedAct"
    },
    {
      "type":"postback",
      "title":"I want to help",
      "payload":"getStartedHelp"
    },

  ]
}' "https://graph.facebook.com/v2.6/me/thread_settings?access_token=PAGE_ACCESS_TOKEN"

About

Faceboot-Messenger bot for sexual abuse victims.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 87.0%
  • HTML 13.0%