尝试使用 Graph API (Facebook C# SDK) 更新 Facebook 事件
我正在尝试使用 Facebook C# SDK 更新 Facebook 事件的描述。我已向我的应用程序授予以下权限:
“publish_stream,email,manage_pages,user_events,create_event,rsvp_event”
我尝试更新的事件是我自己的事件之一,所以我相信我应该能够更新它。
在下面的代码中,“9999”是我创建的事件的事件ID,以及我试图修改的事件:
Authorizer authorizer = new Authorizer();
FacebookClient fbapp = new FacebookClient(authorizer.Session.AccessToken);
Console.Write(fbapp.Get("9999"));
dynamic parameters = new ExpandoObject();
parameters.description = "the new description";
fbapp.Post("9999", parameters);
fbapp.Get 工作正常并返回事件的详细信息。
问题出在 Post 方法上,它返回 (OAuthException) (#200) Permissions error
关于我哪里出错了有什么想法吗?
I am trying to update the description of a Facebook event using the Facebook C# SDK. I have granted the following permission to my application:
'publish_stream,email,manage_pages,user_events,create_event,rsvp_event'
The event I am trying to update is one of my own events, so I believe I should be able to update it.
In the code below "9999" is the event id of the event I created, and the event I am trying to amend:
Authorizer authorizer = new Authorizer();
FacebookClient fbapp = new FacebookClient(authorizer.Session.AccessToken);
Console.Write(fbapp.Get("9999"));
dynamic parameters = new ExpandoObject();
parameters.description = "the new description";
fbapp.Post("9999", parameters);
The fbapp.Get works fine and returns the details of the event.
The problem is with the Post method, this returns (OAuthException) (#200) Permissions error
Any ideas as to where I am going wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这个问题实际上是 Facebook Graph API 中的一个错误,请参阅 此处查看错误报告
看来您只能使用 Graph API 来编辑您的应用创建的事件,而不能编辑 Facebook 内用户创建的现有事件。
希望它能尽快修复!
This issue is in fact a bug in the Facebook Graph API, see here for the bug report
It appears to be the case that you can only use the Graph API to edit events created by your app, and not existing events created by users within Facebook.
Hopefully it will be fixed soon!
如果您确实拥有所有权限,我认为您应该在参数中包含每个必填字段(因为我没有这样做,我只能猜测!),而不仅仅是您想要编辑的字段。
希望这对你有帮助安德鲁。
If you really have all permissions, I think you should include every mandatory field in the parameters (as I haven't done this, I can only guess!) and not only the field you wish to edit.
Hope this has helped you Andrew.