从FB插件中的DB链接

时间:2013-02-10 15:39:42

标签: javascript asp.net facebook

我想通过一个按钮在FB上分享我的文章。文章和图片来自数据库。问题是 “如何在此超链接上设置链接和图像?” 我想在CodeBehind中设置linkpictureRedirect_uri属性。

<td>
  <asp:LinkButton ID="LinkButton1" runat="server" 
  PostBackUrl="https://www.facebook.com/dialog/feed?
  app_id=458358780877780&
  link=http://localhost:49441/ProjectLand/detail.aspx?id=14&
  picture=http://fbrell.com/f8.jpg&
  name=Facebook%20Dialogs&
  caption=Reference%20Documentation&
  description=Using%20Dialogs%20to%20interact%20with%20users.&
  redirect_uri=https://mighty-lowlands-6381.herokuapp.com/" Text="Share"
  >LinkButton</asp:LinkButton>

                    </td>
                </tr>
            </table>
            <hr />
        </div>
        <div class="FontSmall marginTop" style="font-size: 11pt;">
            <asp:Panel ID="pnl1" runat="server" CssClass="pnl1">
                <asp:Image ID="img1" runat="server" Width="300px" Height="250px" />
            </asp:Panel>
            <asp:Panel ID="pnl2" runat="server" CssClass="pnl2">
                <asp:Image ID="img2" runat="server" Width="680px" Height="300px" />
            </asp:Panel>
            <asp:Literal ID="ltlDesc" runat="server"></asp:Literal></div>  

图片img1img2ltlDesc正在填充数据库。

1 个答案:

答案 0 :(得分:0)

找到了一个很好的解决方案
请参阅链接 Custom Facebook Share Button in Asp.Net