Facebook Comments Plugin

Add Facebook comments plugin in Osclass to allow users to comment on your site using their Facebook account. 

You need a facebook application to insert comments plugin on your site. Go on this URL and create a facebook application: Facebook for Developers

Click on My Apps from the right top menu and Create App, add the App Name, click on Settings => Basic from left menu then fill the Privacy Policy URL and Terms of Service URL with a valid link and choose a Category for this App, all is done just click Save Changes from bottom.  Now you have to activate this App from right corner top where you have the status(from Development to Live) of the app and a slider to activate the App.

The next step is to include the code on your page to display the comments widget.

Go on this link to configure the widget: Comments Plugin

You have the Comments Plugin Generator where you will select your App for this plugin and you can change the widget Language after you click Get  Code, you can more option available but for now, we use the default one. 

The code from step 2 will be changed, and you have to add this code after the body tag from your theme and in the page that you want to display this widget. We will use this option to display comments on the item page so we need to edit item.php from your theme (in this case bender theme) and add this code after the body tag.

<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.3&appId=APP_ID&autoLogAppEvents=1"></script>

Now the code from step 3 needs to be included in the area that you want to display the comments widget, but we have to make a change in that code to have different comments on each item

<div class="fb-comments" data-href="<?php echo osc_item_url(); ?>" data-width="" data-numposts="5"></div>

The Step 2 code was added just above of <div id="item-content"> and the coed from step 3 above of <?php osc_current_web_theme_path('footer.php'); ?> at the end of the file.



Subscribe to get the latest listings, updates and special offers delivered directly in your inbox.