我可以将消息发布到 FB 墙上。但是当消息中有链接时。它仅显示为整个文本,而不是链接。
我首先尝试使用普通的锚标签和 facebook 元标签。它仍然是一样的。我该如何解决这个问题?
protected void btnPostToWall_Click(object sender, EventArgs e)
{
var fb = new FacebookWebClient();
dynamic parameters = new ExpandoObject();
string strLink = "<meta property=\"og:url\" content=\"" + Request.Url.ToString() + "\"/>";
strMessage = strName + " read the article " + strLink;
parameters.message = strMessage;
try
{
dynamic id = fb.Post("me/feed", parameters);
lblPostMessageResult.Text = "Message posted successfully";
txtMessage.Text = string.Empty;
}
catch (FacebookApiException ex)
{
lblPostMessageResult.Text = ex.Message;
}
}