我正在一个网站工作,用户要求我执行功能,一旦在Facebook上的终端用户喜欢该网页,或者用户在D digg分成纽顿上点击该网页,即可向终端用户显示部分内容。
I have implemented a callback successfully which shows the content after the facebook button is liked. The way I did it is like this:
<div id= fb-root style= ></div> <fb:like href= URL to like show_faces= false border_color= stream= false header= false ></fb:like-box><script type= text/javascript >
window.fbAsyncInit = function() {
FB.init({appId: APP ID , status: true, cookie: true, xfbml: true});
FB.Event.subscribe( edge.create ,
function(response) {
alert ( You clicked the facebook button );
// Other javascript to be executed can be placed here.
}
);
};
(function() {
var e = document.createElement( script ); e.async = true;
e.src = document.location.protocol +
//connect.facebook.net/en_US/all.js ;
document.getElementById( fb-root ).appendChild(e);
}());
</script>
上述代码中的警示只有在报警证实用户点击了像纽顿这样的面纱时才会执行。
I am trying to do something similar with Digg as well. I searched there API but I was not able to find a solution to such problem.
简言之,我想知道,是否有回响证实用户点击了 di子吗?
Thanks and any help would be appreciated.