3
我想知道如何在VB.NET winforms应用程序中添加Like按钮。 我创建了index.html,其中包括调用Facebook Likerame的iframe 现在我使用WebBrowser Control来显示Facebook Like Button。 它出现在我的表单中,并可以用Facebook帐户登录的问题是像Count不增加,请帮助我!如何在桌面应用程序中添加Facebook Like按钮?
这是我使用的示例代码
的index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<iframe src="http://www.facebook.com/plugins/like.php?href=https%3A%2F %2Fwww.facebook.com%2Fchequeprintingsoftware&send=false&layout=standard& amp;width=450&show_faces=true&action=like&colorscheme=light&font& amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
</body>
</html>
VB.NET
Private Sub frmFaceBookLike_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim html As String
html = File.ReadAllText(Application.StartupPath & "\index.html")
WebBrowser1.DocumentText = html
End Sub
但是,您必须注意一点 - 此Open Graph操作不会自动显示likes count。您可能需要为此单独调用一个API,然后单独显示它。 –
我没有明白你的观点,因为我的技能很弱。所以我可以为此获取示例代码。我已经是C#SDK,它只支持Window 8桌面应用程序,对不对?那么如何创建我自己喜欢的按钮?请帮助我,我会等待您的回复。 –
好的,所以C#SDK不仅支持Windows 8应用程序 - 它支持Windows窗体,ASP.NET,Silverlight和Windows Phone。截至目前,还没有这样的样本 - 但我想我可以在一两天内编写一个代码样本。 –