How to setup Facebook application
To start the configuration, you need a Facebook for Developers account so you can use API credentials.
When in basic settings, fill out the "App Domains" field with the name of the domain of your BeezDesk installation. Only the website from this domain will be able to use your Facebook app. You also have to fill out the "Contact Email" with a valid email address.
Note: if you don't have a domain name (only an IP address) just leave the App Domains blank. If you try to set App Domains to an IP address it will show the following error: "This must be derived from Canvas URL, Secure Canvas URL, Unity Binary URL, Site URL, Mobile Site URL, Page Tab URL or Secure Page Tab URL. Check and correct the following domains: ..."
Still in this section you also have to fill out the fields Terms of Service URL, Privacy policy URL and you need to add at least one App Icon.
For Privacy policy URL you can use your own URL e.g. http://mystore.com/privacy-policy, the same for Terms of Service. If you don't have an icon you can use the BeezDesk image attached at the end of this article.
Please notice the App ID and App Secret fields. You will need both App ID and App Secret key later on when configuring the Facebook App inside your BeezDesk.
When this is saved, please navigate to 'Facebook Login' product and its Settings. You will have to set 'Valid OAuth redirect URIs' here - insert 2 values "https://<your.domain>/scripts/fb_agent_login.php" and "https://<your.domain>/scripts/fb_visitor_login.php" (and don't forget to replace <your.domain> with your real BeezDesk domain name). If you don't do this Facebook will return an error when you try to connect pages with BeezDesk: "Can't load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings."
Now, navigate to App Review section (left menu) and make the app public. Otherwise your chat messages to your customers will be marked as spam by Facebook.
So, right now you are ready to start with the activation of Facebook plugin of your BeezDesk application.
In your BeezDesk navigate to Configuration > Facebook and click Enable Facebook
Into the App ID field enter the App ID and into the App Secret enter the Secret key you found in the "Dashboard" when creating the Facebook app. Then click Save.
Afterwards at Configuration > Facebook a "Pages" menu item will show up where you can connect your BeezDesk with all the Facebook pages which you administrate (admin role in Facebook page).
You will either get a facebook login screen, or if you are already logged in with a facebook account, then you will see a screen where you can choose the level of privacy (by default is 'Friends') and where you have to click "Okay"