0
當我點擊「分享」時,它會在新標籤頁中打開Facebook分享頁面。我想在此頁面的左欄中顯示temp.jpg。這個怎麼做?facebook分享帶照片的頁面
Test.aspx的
<div id="page-wrap">
<!-- AnythingSlider #1 -->
<ul id="slider1" style="width: 778px; height: 452px; background:#fff;">
<li>
<div style="float: left; padding-right: 35px; padding-left:50px;">
<img src="../../img/temp.jpg" style="width: 264px;
height: 377px; border: none;" />
<uc:DownloadControl ID="DownloadControl1" runat="server" PageParameters="1" />
</div>
</li>
<li>
<uc:DownloadControl ID="DownloadControl2" runat="server" PageParameters="2" />
...
DownloadControl.ascx
<div style="float: left">
<a class="icerik" id="facebookShare" runat="server" target="_blank">
<img border="0" src="images/facebook.jpg" alt="Resorts"
title="Hotels & Resortss" /> Share </a>
DownloadControl.ascx.cs
protected void Page_Load(object sender, EventArgs e)
{
facebookShare.HRef = "http://www.facebook.com/sharer.php?u=http://www.test.com/test.aspx";
}
新的發展,你不應該使用'sharer.php'。它已被棄用,並可能隨時停止工作。改爲使用[like button](https://developers.facebook.com/docs/reference/plugins/like)。 – cpilko