How to create a WhatsApp app on Facebook Developers?
To use the WordPress plugin, you may need to create a Facebook application and configure it so that the plugin automatically sends the right reply to the message sent.
facebook developers homepage
You may need to log in to your account. Once logged in, you may need to create a new application :
facebook developer homepage empty
Once you've clicked on the "Create an application" option, a modal window appears and you can choose the option below.
Simply select the Business option to be able to use the WhatsApp options:
facebook developer new app modal
Once "Business" is selected, fill in the fields with the name of your application, the application contact email, and the business account you wish to associate with your WhatsApp application:
facebook developer pre submit create app
Once filled, click on the option with the name create app, once done your page will reload.
You will need to click the setup options for 'Webhooks' and ‘WhatsApp’ displayed on the page, once done you will see the options showed below like this :
facebook app products created
In order to go forward, you may need to configure the webhooks for the WhatsApp messaging.
Click on Webhooks in the left-hand sidebar, then click on the user selection options, we'll need to choose Whatsapp Business Account as this is the one that will allow us to set up the automatic sending of messages from our website as an autoresponder.
Once done, a modal will show into this you will see two options that is really important for us :
facebook webhooks option
- Callback URL: A URL where Facebook will send the message sent by a customer to your app. To find it, you just need to head to your WordPress site with the plugin activated and copy the webhook url find on the plugin settings page :
- Verify token: A private token, Facebook will use to verify if your connection to the app is trustworthy or not. You can define it under the plugin page too once you have put it on the Facebook app page.
Once filled, you will have to verify, if the verification is successful, the token will be saved automatically to your account. At the page refresh, the following options will be displayed on your page :
Here is the webhooks options explanation :
Then subscribe to the webhooks, you want to receive notifications from.
At the end, go to the WhatsApp Configuration menu, configure the webhook the same way we configure the other webhook option. Add your phone number to your app too, this phone number will be used to do any communication.
facebook configuration screen
Once everything done, you will see under WhatsApp > API Setup the following details that are very important for the configuration we'll do into the plugin :
- Phone number ID : Personal Unique phone number you can use in order to send WhatsApp messages through Cloud API, Business Manager API and more,
- WhatsApp Business Account ID : The WhatsApp account ID lets Facebook know which account your number is linked to
facebook personal data