Adding Facebook comment widget to Shop-Script storefront

The “Comments Box” plugin from Facebook allows online store visitors registered in this social network (and several other services) to post comments about your products, discounts, etc. By using this plugin, you can also moderate comments, your visitors will be able to “like” any previously posted comments and to reply to them.

How to install

Open the “Comments Box” section on the Facebook website at http://developers.facebook.com/docs/reference/plugins/comments/. Select the desired options for the comments box:

  • URL to comment on: leave unchanged.
  • Number of posts: the number of posts to be displayed by default.
  • Width: the plugin width, in pixels; minimum recommended value is 400.

Once all necessary options have been selected, click on the “Get Code” button. This will show a pop-up window with plugin-embedding code.

  1. Copy the first code snippet ("JavaScript SDK") and paste it to file index.html of your design theme, right after the opening <body> tag.
  2. Copy and paste the second code snippet into the desired design theme template, where you want the comments box to appear.
Tip: Should you want your visitors to be able to post comments only on product-viewing pages, then paste the second code snippet to template product.html.

Once you have saved all changes, the following comments box should appear in your online storefront:

Comments moderation

In order to be able to moderate comments directly in the storefront, open section “Settings” of the Site application and add the following code to the "Custom JavaScript code" field in the Site app settings:

<meta property="fb:admins" content="<em>YOUR_FACEBOOK_USER_ID</em>"/>

Specify your Facebook user ID instead of YOUR_FACEBOOK_USER_ID.

Tip: To find out your user ID, log in to your Facebook account and click on your name in the top-left corner. Copy your user ID from the URL in the address bar after ?id=.

You can also allow several Facebook users to moderate comments posted in your storefront. To do so, specify their user IDs in the above line of code and separate them by a comma; e.g.:

<meta property="fb:admins" content="<em>100000111111111</em>,<em>100000111111112</em>,<em>100000111111113</em>"/>

0 comments

    Posting new comments is disabled for this topic.


    Раздел помощи работает на основе приложения «Хаб»