开发者

Delete Wall Post on page as page C# SDK

开发者 https://www.devze.com 2023-04-03 05:10 出处:网络
I want to delete the post as page. I already have access token of the admin user and access token from the page.

I want to delete the post as page. I already have access token of the admin user and access token from the page.

My Code:

var fbClient = new FacebookClient { AccessToken = getPageAccessToken() };

dynamic parameters = ne开发者_开发百科w ExpandoObject();

parameters.id = postId;

fbClient.Delete(m_GroupId + "/feed",parameters);

I get the following error:

 {"error":
    {
       "type":"OAuthException",
       "message":"Invalid token: \"PAGE_ID\".  An ID has already been specified."
    }
  }

I replaced the page id above with PAGE_ID


use the page access token and pass the post id as the path for Delete method.

var fb = new FacebookClient("pageAccessToken");
fb.Delete(postId);


I don't know the C# SDK, but from the look of it you're setting the ID twice, once with parameters.id and again with m_GroupID

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号