Нашел ответ и все работает!!! Вот рабочий код:
Javascript
var parametrs = {
appId: 1.....1,
autoLogAppEvents: true,
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
version: 'v2.9' // or v2.1, v2.2, v2.3, ...
};
window.fbAsyncInit = function () {
FB.init(parametrs);
FB.Event.subscribe('edge.create', function (response) {
alert('Liked');
});
}
);
FB.Event.subscribe('edge.remove', function (response) {
alert('DisLiked')
});
};
(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/sdk.js#xfbml=1&version=v2.7";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
HTML5
<div id="fb-root"></div><div class="fb-like" data-href="https://www.facebook.com/testpage" data-layout="standard" data-action="like" data-size="small" data-show-faces="true"></div>