这是我的html colde。我想点击像按钮一样像事件()那样触发fb。
<html xmlns:fb="http://ogp.me/ns/fb#">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body >
Facebook Like Test!
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : '578995225546612',
status : true,
cookie: true,
xfbml : true
});
console.log("I m in inint()");
FB.Event.subscribe('edge.create', function(href, widget) {
alert('testing :)');
console.log("chan you like me !!!");
});
};
(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 = "https://connect.facebook.net/en_US/all.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
</script>
<fb:like href="https://www.facebook.com/99sanay" layout="standard" action="like" show_faces="true" share="false"></fb:like></body>
我尝试将Facebook视为事件。但是当点击按钮时,没有任何事情发生。获取以下消息。