tried sending request to this url
https://graph.facebook.com/v2.6/PAGE_ID/thread_settings?access_token=PAGE_ACCESS_TOKEN
But didn't work.
tried sending request to this url
https://graph.facebook.com/v2.6/PAGE_ID/thread_settings?access_token=PAGE_ACCESS_TOKEN
But didn't work.
Very simple solution, just open in terminal and go to your host folder location,( in mine
/var/www/html/booking/public/facebookbot
) and paste the following code:and press enter, make sure to put your correct access token, also you may recognize when your getting started button pressed from payload which is GET_STARTED_PAYLOAD in above code sample.
The current format is, https://graph.facebook.com/v2.6/me/messenger_profile?access_token=PAGE_ACCESS_TOKEN
Send a post request using your page access token
with following data
Facebok Docs: Get Started Button
Hope this new method solve your problem. Don't forget to delete sent messages first using Facebook Web to see button in action.
There is a library in npm that wraps the functionality of the POST/DELETE actions here: https://www.npmjs.com/package/fb-get-started-button
A better solution in my opinion is to use the Microsoft Bot Framework and use its /firstRun to send the messenger get started button
The platforms.firstRun looks as shown below
This in turn calls platforms.facebook.firstRun
The platforms.facebook.sendThread looks as shown below // Calls the Facebook graph api to change bot settings
Notice the facebookTemplates.getStarted(), that actually has the json for get started which looks as shown below
Fully pluggable code architecture for performing a first run operation across all chatbot platforms. Works perfectly on my bot HERE
you have to run an appropriate curl command to set it up. check this link out and look at their example. https://developers.facebook.com/docs/messenger-platform/implementation#send_api