1

我有一个 Facebook 自定义分享按钮的代码:

<script>
function fbs_click() {
u=location.href;
t=document.title;
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
</script>
<a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" onclick="return fbs_click()" target="_blank" class="fb_share_link">
<img src="../../../../../image/photography/pics/fb-share.png" alt="Share this!" width="57" height="21" border="0">
</a>

这应该从页面中抓取信息,但由于某种原因它没有,它被重定向到站点的主要 index.html。

我尝试添加 facebook og 标签和额外的代码,但无济于事。

有什么想法吗?

编辑:被告知共享功能已被弃用,我尝试使用提要对话框执行此操作:

<a href="https://www.facebook.com/dialog/feed?link=http://www.travel2italy.com/Travel/Italy/Company/photography/index.html&picture=http://www.travel2italy.com/image/photography/pics/homepage/florence1-home.jpg&name=travel2italy.com&caption=Photo%20Gallery&description=A%20Beautiful%20photo%20of%20Florence&redirect_uri=http://www.travelive.com" target="_blank">
<img src="../../../../../image/photography/pics/fb-share.png" alt="Tweet this!" width="57" height="21" border="0">
</a>

但是当我点击链接时,它会将我带到 facebook 并说发生了错误,wth?!:(

编辑2:

我不知道需要 app_id 参数,注册了一个应用程序并且它现在可以工作,但是它去掉了我在链接末尾的#section(我希望它链接到幻灯片中的特定幻灯片)

编辑 3:

现在使用共享器的一些共享按钮似乎确实有效,但不要将所有照片从页面上拉下来让我选择我想要的那个,这太疯狂了,这可能只是一个缓存问题吗?

4

0 回答 0