Advertisement
bananamariap

bot

Nov 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. if($messageText == "today"){
  2. $answer = ["attachment"=>[
  3. "type"=>"template",
  4. "payload"=>[
  5. "template_type"=>"list",
  6. "elements"=>[
  7. [
  8. "title"=> "Classic T-Shirt Collection",
  9. "image_url"=> "https://www.cloudways.com/blog/wp-content/uploads/Migrating-Your-Symfony-Website-To-Cloudways-Banner.jpg",
  10. "subtitle"=> "See all our colors",
  11. "default_action"=> [
  12. "type"=> "web_url",
  13. "url"=> "https://www.cloudways.com/blog/migrate-symfony-from-cpanel-to-cloud-hosting/",
  14. "webview_height_ratio"=> "tall",
  15. // "messenger_extensions"=> true,
  16. // "fallback_url"=> "https://peterssendreceiveapp.ngrok.io/"
  17. ],
  18. "buttons"=>[
  19. [
  20. "type"=>"web_url",
  21. "url"=>"https://petersfancybrownhats.com",
  22. "title"=>"View Website"
  23. ],
  24. ]
  25. ],
  26. [
  27. "title"=>"Welcome to Peter\'s Hats",
  28. "item_url"=>"https://www.cloudways.com/blog/migrate-symfony-from-cpanel-to-cloud-hosting/",
  29. "image_url"=>"https://www.cloudways.com/blog/wp-content/uploads/Migrating-Your-Symfony-Website-To-Cloudways-Banner.jpg",
  30. "subtitle"=>"We\'ve got the right hat for everyone.",
  31. "buttons"=>[
  32. [
  33. "type"=>"web_url",
  34. "url"=>"https://petersfancybrownhats.com",
  35. "title"=>"View Website"
  36. ],
  37. ]
  38. ],
  39. [
  40. "title"=>"Welcome to Peter\'s Hats",
  41. "item_url"=>"https://www.cloudways.com/blog/migrate-symfony-from-cpanel-to-cloud-hosting/",
  42. "image_url"=>"https://www.cloudways.com/blog/wp-content/uploads/Migrating-Your-Symfony-Website-To-Cloudways-Banner.jpg",
  43. "subtitle"=>"We\'ve got the right hat for everyone.",
  44. "buttons"=>[
  45. [
  46. "type"=>"web_url",
  47. "url"=>"https://petersfancybrownhats.com",
  48. "title"=>"View Website"
  49. ],
  50. ]
  51. ]
  52. ]
  53. ]
  54. ]];
  55. $response = [
  56. 'recipient' => [ 'id' => $senderId ],
  57. 'message' => $answer
  58. ];}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement