php - 在Facebook上用户共享链接时做点什么

时间:2018-01-06 00:14:46

标签: php facebook

有没有办法在用户从我的网站上分享facebook上的链接后运行php代码?
我尝试了这段代码,但在链接分享后,我没有重定向到

<div id="shareBtn">Share</div>
<script>
document.getElementById('shareBtn').onclick = function() {
  FB.ui({
    method: 'share',
    redirect_uri: 'https://domain.ext/landing.php',
    display: 'popup',
    href: 'https://domain.ext/link',
  }, function(response){});
}
</script>

我可能无法知道帖子隐私是私密的还是帖子会在分享后删除,但我必须确保用户在重定向到有效链接之前有效地分享链接 我能怎么做?
感谢

0 个答案:

没有答案