我想添加一個Facebook共享按鈕,但彈出窗口不顯示正確的參數。這是我的代碼:Facebook共享按鈕參數不起作用
<?php
$title=urlencode('Title of the iFrame Tab');
$url=urlencode('http://my-domain/index.php?langue=eng&table_pub=publication_eng&id=22&rub=publication');
$summary=urlencode('Custom message here');
$image=urlencode('http://my-domain/img.png');
?>
<a onClick="window.open('http://www.facebook.com/sharer.php?s=100&p[title]=<?php echo $title;?>&p[summary]=<?php echo $summary;?>&p[url]=<?php echo $url; ?>&p[images][0]=<?php echo $image;?>','sharer','toolbar=0,status=0,width=548,height=325');" href="javascript: void(0)">Share</a>
但這個代碼總是告訴我一個彈出這樣的:
我跟着這篇文章,它幫助我找到合適的解決方案: http://www.hyperarts.com/blog/tutorial-how-to-add-facebook-share-button-to-your-web -site-pages/ – Aminesrine