1
當我在看html源代碼,我看這Facebook的像回調,並張貼到目標喜歡
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<script >
FB.init({
status: true,
cookie: true,
xfbml: true
});
var username= "gun";
var timenow="1311002200";
var securitykey="ef64ba59d2b0f26d69c94fafb3f008e0";
//pls find a way to capture username either session or something else.
FB.Event.subscribe('edge.create', function(response) {
document.getElementById(response).style.visibility = "hidden";
document.getElementById(response+'1').style.visibility = "visible";
//response will be
$.ajax({
type: "POST",
url: "fbreceive.php",
data: "data="+response + "---" + username+ "---"+securitykey+ "---"+timenow,
//this will post to fb receive as url=http://facebookpagewhichwasliked&user=username
cache: false
});
});
</script>
你能告訴我JavaScript代碼fbreceive.php包含的facebook是什麼(somekind的api)? 因爲沒有這個,我們確實喜歡的網址不再自動地...