Skip to content

Instantly share code, notes, and snippets.

@tcelestino
Last active July 4, 2022 01:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tcelestino/4b8a0928cdfdcd301a36268b316c7851 to your computer and use it in GitHub Desktop.
Save tcelestino/4b8a0928cdfdcd301a36268b316c7851 to your computer and use it in GitHub Desktop.
curl to Facebook's APIs
curl -X POST -H "Content-Type: application/json" -d '{
"setting_type":"call_to_actions",
"thread_state":"new_thread",
"call_to_actions":[
{
"payload":"Greeting"
}
]
}' "https://graph.facebook.com/v2.9/me/thread_settings?access_token=PAGE_ACCESS_TOKEN"
curl -X POST -H "Content-Type: application/json" -d '{
"setting_type":"greeting",
"greeting":{
"text":"Welcome to Devs Digest Bot. I will to show the recents posts of development blogs. From to start click on Get Started button."
}
}' "https://graph.facebook.com/v2.6/me/thread_settings?access_token=PAGE_ACCESS_TOKEN"
curl -X DELETE -H "Content-Type: application/json" -d '{
"setting_type":"greeting"
}' "https://graph.facebook.com/v2.6/me/thread_settings?access_token=PAGE_ACCESS_TOKEN"
curl -X POST -H "Content-Type: application/json" -d '{
"get_started":{
"payload":"Get Started"
}
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=PAGE_ACCESS_TOKEN"
curl -X DELETE -H "Content-Type: application/json" -d '{
"fields":[
"get_started"
]
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=PAGE_ACCESS_TOKEN"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment