[英]How to delete post from wall?
I have a problem with deleting posts from facebook wall. 我从Facebook墙删除帖子时遇到问题。 I use Facebook C# SDK V4.2.1. 我使用Facebook C#SDK V4.2.1。 Example of posting message: 发布消息的示例:
Dictionary<string, object> parameters = new Dictionary<string, object>();
//init parameters
return _app.Post("me/feed", parameters);
And everything is ok, method Posts returns id of post. 一切正常,Posts方法返回post的ID。
But when I try to delete post with same id 但是当我尝试删除具有相同ID的帖子时
Dictionary<string, object> parameters = new Dictionary<string, object>();
if(settings.Id!=null)
parameters.Add("id", settings.Id);
return _app.Delete("me/feed",parameters);
//id - Facebook.JsonObject key = new Facebook.JsonObject();
//key.Add(new KeyValuePair<string,object>("id",id));
An error has been occurred: 发生错误:
(OAuthException) Invalid token: "me". (OAuthException)无效令牌:“我”。 An ID has already been specified. 已经指定了一个ID。 Stack trace: at Facebook.FacebookApp.MakeRequest(HttpMethod httpMethod, Uri requestUrl, Byte[] postData, String contentType, Type resultType, Boolean restApi) in d:\\Projects\\facebooksdk\\Source\\Facebook\\FacebookApp.cs:line 800 堆栈跟踪:位于d:\\ Projects \\ facebooksdk \\ Source \\ Facebook \\ FacebookApp.cs:line 800中的Facebook.FacebookApp.MakeRequest(HttpMethod httpMethod,Uri requestUrl,Byte [] postData,String contentType,Type resultType,Boolean restApi)
and so on. 等等。
I tried to remove token "me", to past instead of token userId,result is the same. 我试图删除令牌“我”,过去而不是令牌userId,结果是相同的。
只需尝试使用_app.Delete(settings.id)。
我猜Facebook不允许删除....作为Facebook为避免任何利用而设置的安全限制
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.