我使用此代码发布到Facebook Feed:
public string UploadPost(string intTitle, string inMessage, string inLinkCaption, int inLinkUrl, string inLinkDescription, string inLinkUrlPicture)
{
object obj;
Facebook.JsonObject jsonObj;
FacebookClient client;
string access_token = ConfigurationManager.AppSettings["FacebookPageAccessToken"].ToString();
client = new FacebookClient(access_token);
var args = new Dictionary<string, object>();
args["message"] = inMessage;
args["caption"] = inLinkCaption;
args["description"] = inLinkDescription;
args["name"] = intTitle;
args["picture"] = inLinkUrlPicture;
args["link"] = inLinkUrl;
if((obj = client.Post("/" + ConfigurationManager.AppSettings["FacebookPageId"].ToString() + "/feed", args)) != null)
{
if((jsonObj = obj as Facebook.JsonObject) != null)
{
if(jsonObj.Count > 0)
return jsonObj[0].ToString();
}
}
return string.Empty;
}
使用prev方法的帖子ID创建后是否可以编辑此帖子,或者我是否必须删除它并将其作为新帖子发布?