Facebook Integrationby IT Projects Labs https://apps.odoo.com/apps/modules/14.0/sync , Ivan Yelizariev https://apps.odoo.com/apps/modules/14.0/sync
|Lines of code||6676|
Connect Facebook to Odoo
Tested and maintained by
IT Projects Labs
- Sync Leads Facebook => Odoo
- Create new Facebook App
- App type: Business
- Apps Purpose: Yourself or your own business
- In Facebook App page open Settings >> Basic to get App ID (APP_ID) and App Secret (APP_SECRET)
- Select your page or create new one
- Get Page ID from the Page, that you want to connect to your chat bot.
- Open to About section of the Page. The url looks like this: https://www.facebook.com/YOUR-PAGE-123456789/about/,
- Scroll down to the bottom where you will find Page ID value, which is just a big number. Use it as PAGE_ID value in Project parameters (see below).
Facebook Page: Lead Ad
If you plan to use Facebook integration to get leads from Facebook, create a lead ad via menu Publishing Tools >> Forms Library. Once form is created, click [Create Ad] button
Facebook Page: Access Token
Open Graph API Explorer
Select Facebook App you created on the previous step Facebook App
Select option "Get User Access Token"
Select required permisions, e.g.:
Press the button [Generate Access Token]
Copy value under Access Token label. Use it as USER_ACCESS_TOKEN value in Project parameters (see below).
You can ignore warning "Submit for Login Review". It just means that you cannot work with Facebook Pages where you don't have a role.
Install this module in according to Sync Studio Documentation
Install python packages:
python3 -m pip install facebook_business
Due to Odoo limitations, one of the following workarounds should be applied on setting up webhooks:
- delete line that raise exception in case of type mismatching (search for Function declared as capable of handling request of type in standard Odoo code). In most cases, this workaround doesn't need to be reverted
- open file sync/controllers/webhook.py and temporarily change type="json" to type="http"
- Open menu [[ Sync Studio ]] >> Sync Projects
- Choose Facebook project
- Go to Parameters tab
- Click [Edit]
- Fill Parameters and Secrets with the values you got in previous steps:
- Click [Run Now] button in GENERATE_PAGE_ACCESS_TOKEN
- Click [Run Now] button in SETUP_APP
- Click [Run Now] button in SETUP_PAGE_WEBHOOK
Create a lead in facebook and check that it's synced to Odoo
Please log in to comment on this module
- The author can leave a single reply to each comment.
- This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
- If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.