简体   繁体   中英

How to delete post from wall?

I have a problem with deleting posts from facebook wall. I use 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.

But when I try to delete post with same 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". An ID has already been specified. 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

and so on.

I tried to remove token "me", to past instead of token userId,result is the same.

只需尝试使用_app.Delete(settings.id)。

我猜Facebook不允许删除....作为Facebook为避免任何利用而设置的安全限制

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM