Facebook Like button Issue on the Website

I have added a facebook like button to my website. I am able to see a like button on the webiste. However when I click the like button, the like count increases but I receive a 401 authorisation required error in the pop up.

On reading facebook documentation further on facebook scrape url. I went to Object debugger and debugged the home page of my website. When I clicked the link for scrape url I get this message "document returned no data"

When I clicked the graph api link, I get this as the ouput.

{ "id": "id_nos", "url": "http://sitename.com /", "type": "website", "updated_time": "2014-03-06T04:30:13+0000", "created_time": "2014-03-04T06:58:54+0000", "is_scraped": false }

Can anyone tell me, how I am suppose to handle this error. What steps I will have to take to fix this issue?

Thanks in Advance

Updated the code for like button:

<div class="like-box">
    <div class="fb-like"
        data-href="<?php echo $poll['short_url']; ?>"
        data-width="20" data-show-faces="false">

The script is :

(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

Update 2:

The site is protected and asks for username and password (Http authentication). Could this be the reason?


Facebook needs to access your site in order to retrieve the Open Graph tags. If your site is protected with HTTP authentication Facebook cannot do so, and so like/share operations won't work correctly.

Need Your Help

How to convert Python decimal to SQLite numeric?

python sqlite decimal numeric

I have a program that reads financial data in JSON and inserts it into an SQLite database. The problem is when I'm inserting it into SQLite numeric column and it doesn't seem to like the decimal o...