Overview
Install 1st base module Pragmatic Facebook Connector.
Install Validation module pragmatic Facebook Connector validation
Go to developers.facebook.com & log in with your account You will find an option to create a
new App.
Next, you may select Business App
Next, fill in the basic details such as the name of the app & app purposes etc & create the App.
Next, you need to set up the messenger in your App.
Add the your page to the App.
Once the page is selected it is submitted for login review with Facebook.
In the App, in settings, there is a basic setting option from there we can get the App id & App
secret and set these values in Odoo on the company in Facebook App ID & Facebook App
Secret fields respectively.
Next you need to copy the Page id and place it in Odoo in the Page ID field.
Next, you need to visit this link and generate the short-lived access token. Please make sure the
App is correct, you have selected user-token and the security permissions are correct as well.
Once the Access token is generated copy and paste this in Odoo under the Facebook Short
code field.
Now you may generate the long lived token on the company page by clicking the Authenticate
button.
Once it is Authenticated it will auto-fill the Access Token field. Now you need to generate the
page token with the page token button which will auto-fill the page access token.
Now you can input any random numeric code on the custom verify token field on the company
and make sure to remember it.
Now on the developer.facebook.com, there is an option to add a callback URL.
Once you click on it it opens a popup that asks the callback URL which is the URL of your Odoo
server followed by ‘/get_message_from_facebook’ and the verify token is the same custom
verify token set on the company.
Once the token is verified you need to add the subscriptions
Once all the subscriptions are added you need to uninstall the Pragmatic Facebook Connector
validation and install the Pragmatic Facebook Connector Data Accept. Kindly note do not make
any changes to the Pragmatic Facebook Connector module.
Once this is done you can send and recieve messages from the admin/test account of your
apps only.
The incoming message will check is there is a conversation existing for the sender if there is it
will update the same conversation else create a new one.
You can fetch the name of the sender using Fetch Sender message. Also you can reply to the
messages via a text message or multimedia messages.
Please note that on the facebook app you need to set the privacy policy.
Once all is done you need to put the app through an app review process outlined here which
once approved will allow to use the App.