在喜欢这样的重定向代码后,我使用了 facebook。但我找不到已经喜欢的用户的解决方案。如果用户已经喜欢重定向页面。
代码是
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: 'xxxxxxxxxxxxxxxxx',
status: true,
cookie: true,
xfbml: true
});
FB.Canvas.setSize({ width: 400, height: 80 });
FB.Event.subscribe('edge.create',
function(response)
{
alert('Thank You');
// put redirect code here eg
window.location = "http://www.example.com/FacebookAutoRedirect.asp";
}
);
**if also liked
{
window.location = "http://www.example.com/FacebookAutoRedirect.asp";
}**
};
//Load the SDK asynchronously
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/tr_TR/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
此致