我的故事在FB上发布就好了,但描述并不是发布内容的一部分。我得到的是具有元标记的页面的URL。下面的例子中有一些冗余,但我认为不重要。
是否有某些原因说明不会发布?
var accessToken = (string)Session["accessToken"];
var args = new Dictionary<string, object>();
args["appnamespace"] = "myapp";
args["object_name"] = "myobname";
args["myobname"] = "/social/post/facebook.aspx?id=qwerdefre";
args["action"] = "Earned";
args["access_token"] = accessToken;
args["description"] = "Praesent neque velit, ultrices vitae purus eget";
args["image"] = "/img/thisimage.png";
args["link"] = "/pages/welcome";
args["title"] = "The Title";
FacebookClient client = new FacebookClient(accessToken);
client.AppId = Configuration.Social.FacebookConsumerKey;
dynamic result = client.Post("/me/myapp:myobname", args);
Response.Write(result);
Response.Write("<p/>");
以下是Open Graph页面中的元标记:
<meta property="fb:app_id" content="11123213" />
<meta property="og:title" content="The Title" />
<meta property="og:image" content="/img/thisimage.png" />
<meta property="og:url" content="/social/post/facebook.aspx">
<meta property="og:type" content="myapp:myobname" />
<meta property="og:description" content="Praesent neque velit, ultrices" />
所以,如果有人知道我做错了什么,请告诉我。