Version Description
- Handle edge case which resulted in plugin being broken for some users.
Download this release
Release Info
Developer | |
Plugin | Messenger Customer Chat |
Version | 1.2 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.2
- facebook-messenger-customer-chat.php +1 -1
- readme.txt +22 -3
- script.js +5 -11
facebook-messenger-customer-chat.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Messenger Customer Chat
|
|
4 |
Description: Messenger Customer Chat is the official free Messenger customer chat plugin for WordPress by Facebook. This plugin allows you to interact with your customers using Messenger by integrating it on your WordPress website in three simple steps. To get started, go to your Wordpress Dashboard -> Customer Chat -> click on "Setup Customer Chat."
|
5 |
Author: Facebook
|
6 |
Author URI: https://developers.facebook.com
|
7 |
-
Version: 1.
|
8 |
|
9 |
* Copyright (C) 2017-present, Facebook, Inc.
|
10 |
*
|
4 |
Description: Messenger Customer Chat is the official free Messenger customer chat plugin for WordPress by Facebook. This plugin allows you to interact with your customers using Messenger by integrating it on your WordPress website in three simple steps. To get started, go to your Wordpress Dashboard -> Customer Chat -> click on "Setup Customer Chat."
|
5 |
Author: Facebook
|
6 |
Author URI: https://developers.facebook.com
|
7 |
+
Version: 1.2
|
8 |
|
9 |
* Copyright (C) 2017-present, Facebook, Inc.
|
10 |
*
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: facebook
|
3 |
Tags: Facebook, Messenger, Customer Care, Chat, Messaging
|
4 |
Requires at least: 3.9
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 1.
|
7 |
Requires PHP: 5.2.4
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -69,6 +69,12 @@ The plugin is a snippet of JavaScript code that runs on your WordPress website.
|
|
69 |
= Where can I see all my messages? =
|
70 |
You can see all messages and responses to your Facebook Page in your Page Inbox. Navigate to your Facebook Page on Facebook and click on 'Inbox' at the top.
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
= Can I see messaging analytics for my Facebook page? =
|
73 |
You can see all messages and responses to your Facebook Page in your Page Inbox. Additionally, you can view analytics for your Facebook Page in Page Analytics or via Facebook Analytics. You can learn more about Page Analytics [here](https://developers.facebook.com/docs/analytics/getting-started/pages). If you want more insights on your Facebook Page, visit Page Insights [here](https://www.facebook.com/business/a/page/page-insights).
|
74 |
|
@@ -80,9 +86,22 @@ Of course! This plugin is open sourced on the Facebook Incubator GitHub. You can
|
|
80 |
|
81 |
== Changelog ==
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
= 1.0 - September 24, 2018 =
|
84 |
* Plugin released for all users
|
85 |
|
86 |
== Upgrade Notice ==
|
87 |
|
88 |
-
|
|
|
|
|
|
|
|
2 |
Contributors: facebook
|
3 |
Tags: Facebook, Messenger, Customer Care, Chat, Messaging
|
4 |
Requires at least: 3.9
|
5 |
+
Tested up to: 5.1
|
6 |
+
Stable tag: 1.2
|
7 |
Requires PHP: 5.2.4
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
69 |
= Where can I see all my messages? =
|
70 |
You can see all messages and responses to your Facebook Page in your Page Inbox. Navigate to your Facebook Page on Facebook and click on 'Inbox' at the top.
|
71 |
|
72 |
+
= What permissions do I need on a Page to enable the Messenger customer chat feature? =
|
73 |
+
You need be an administrator of the Page.
|
74 |
+
|
75 |
+
= Why are some of my users seeing an additional confirmation window after clicking "Chat Now"? =
|
76 |
+
A "Continue As" popup is shown infrequently for security purposes. Most signed-in users will only have to click the plugin itself to opt in, without having to re-confirm. Additionally, as more users message you via the plugin, the "Continue As" popup will be shown less often.
|
77 |
+
|
78 |
= Can I see messaging analytics for my Facebook page? =
|
79 |
You can see all messages and responses to your Facebook Page in your Page Inbox. Additionally, you can view analytics for your Facebook Page in Page Analytics or via Facebook Analytics. You can learn more about Page Analytics [here](https://developers.facebook.com/docs/analytics/getting-started/pages). If you want more insights on your Facebook Page, visit Page Insights [here](https://www.facebook.com/business/a/page/page-insights).
|
80 |
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
= 1.2 - February 28, 2018 =
|
90 |
+
* Tested up to WordPress 5.1
|
91 |
+
* Fixed issues with Safari
|
92 |
+
* Fix: Edge case where multiple SDK loaded on the page resulting with plugin not loading
|
93 |
+
|
94 |
+
= 1.1 - October 31, 2018 =
|
95 |
+
* Updated plugin to use new Facebook JS SDK
|
96 |
+
* Fix: Error message in code snippet
|
97 |
+
|
98 |
= 1.0 - September 24, 2018 =
|
99 |
* Plugin released for all users
|
100 |
|
101 |
== Upgrade Notice ==
|
102 |
|
103 |
+
= 1.2 =
|
104 |
+
* Handle edge case which resulted in plugin being broken for some users.
|
105 |
+
|
106 |
+
= 1.1 =
|
107 |
+
* Upgraded plugin to use new Facebook JS SDK and minor bug fixes.
|
script.js
CHANGED
@@ -12,10 +12,6 @@
|
|
12 |
*/
|
13 |
|
14 |
function fbmcc_setupCustomerChat() {
|
15 |
-
const WRONG_ORIGIN_ERROR_MSG =
|
16 |
-
"ERROR:\n"
|
17 |
-
+ "Message origin is not from https://www.facebook.com.\n"
|
18 |
-
+ "Code gen aborted.";
|
19 |
const FACEBOOK_URL = "https://www.facebook.com";
|
20 |
var baseURL = "https://www.facebook.com/customer_chat/dialog/?domain=";
|
21 |
var urlParam = encodeURI(
|
@@ -56,27 +52,25 @@ function fbmcc_setupCustomerChat() {
|
|
56 |
jQuery('#fbmcc-enabled').prop('checked', true);
|
57 |
}
|
58 |
});
|
59 |
-
}
|
60 |
-
jQuery('#fbmcc-codeArea').val(WRONG_ORIGIN_ERROR_MSG);
|
61 |
-
};
|
62 |
});
|
63 |
}
|
64 |
|
65 |
function fbmcc_genScript( pageID, locale, themeColor, greetingText ) {
|
|
|
66 |
return `<div id='fb-root'></div>
|
67 |
<script>(function(d, s, id) {
|
68 |
var js, fjs = d.getElementsByTagName(s)[0];
|
69 |
-
if (d.getElementById(id)) return;
|
70 |
js = d.createElement(s); js.id = id;
|
71 |
-
js.src = 'https://connect.facebook.net/${locale}/sdk.js#xfbml=1&version=v2.12&autoLogAppEvents=1';
|
72 |
fjs.parentNode.insertBefore(js, fjs);
|
73 |
}(document, 'script', 'facebook-jssdk'));</script>
|
74 |
<div class='fb-customerchat'
|
75 |
attribution="wordpress"
|
76 |
page_id='${pageID}'
|
77 |
${themeColor === null ? '' : `theme_color='${themeColor}'`}
|
78 |
-
${
|
79 |
-
${
|
80 |
>
|
81 |
</div>`;
|
82 |
}
|
12 |
*/
|
13 |
|
14 |
function fbmcc_setupCustomerChat() {
|
|
|
|
|
|
|
|
|
15 |
const FACEBOOK_URL = "https://www.facebook.com";
|
16 |
var baseURL = "https://www.facebook.com/customer_chat/dialog/?domain=";
|
17 |
var urlParam = encodeURI(
|
52 |
jQuery('#fbmcc-enabled').prop('checked', true);
|
53 |
}
|
54 |
});
|
55 |
+
}
|
|
|
|
|
56 |
});
|
57 |
}
|
58 |
|
59 |
function fbmcc_genScript( pageID, locale, themeColor, greetingText ) {
|
60 |
+
const hasNoGreeting = (greetingText === null || greetingText === undefined );
|
61 |
return `<div id='fb-root'></div>
|
62 |
<script>(function(d, s, id) {
|
63 |
var js, fjs = d.getElementsByTagName(s)[0];
|
|
|
64 |
js = d.createElement(s); js.id = id;
|
65 |
+
js.src = 'https://connect.facebook.net/${locale}/sdk/xfbml.customerchat.js#xfbml=1&version=v2.12&autoLogAppEvents=1';
|
66 |
fjs.parentNode.insertBefore(js, fjs);
|
67 |
}(document, 'script', 'facebook-jssdk'));</script>
|
68 |
<div class='fb-customerchat'
|
69 |
attribution="wordpress"
|
70 |
page_id='${pageID}'
|
71 |
${themeColor === null ? '' : `theme_color='${themeColor}'`}
|
72 |
+
${hasNoGreeting ? '' : `logged_in_greeting='${greetingText}'`}
|
73 |
+
${hasNoGreeting ? '' : `logged_out_greeting='${greetingText}'`}
|
74 |
>
|
75 |
</div>`;
|
76 |
}
|