使用自定义开放图操作时出错
我收到错误
不允许此操作设置用户消息,因为此属性 未请求批准。
对于我已提交审批的自定义开放图谱操作类型 westberksconnect:report
。
我在 C# .NET 4.0 中使用 Facebook.dll,我使用的代码如下
string strStatus = "";
strStatus = HttpContext.Current.Request.QueryString["status"];
string Lat = HttpContext.Current.Request.QueryString["lat"];
string Lon = HttpContext.Current.Request.QueryString["long"];
string strToken = "XXXX";
string strUpdateText = "We've received a report of a problem with " + strStatus + ".";
var client = new FacebookClient(strToken);
Dictionary<string, object> WallPost = new System.Collections.Generic.Dictionary<string, object>();
WallPost.Add("message", strUpdateText);
WallPost.Add("link", "http://maps.google.co.uk/maps?q=" + Lat + "+" + Lon);
WallPost.Add("name", "View On A Map");
WallPost.Add("picture", "http://www.westberks.gov.uk/images/common/googlemapicons/service_status/highway_009966.png");
WallPost.Add("caption", "View a map of the location of the reported problem");
WallPost.Add("description", " ");
WallPost.Add("problem", "http://samples.ogp.me/10150293874562522");
var response = client.Post("/290203581014564/westberksconnect:report", WallPost);
有谁知道我为什么会收到此错误,他们有解决方案吗?
I'm getting the error
This action is not allowed to set a user message because this property
was not requested for approval.
For a custom Open Graph Action Type westberksconnect:report
that I have submitted for approval.
I'm using Facebook.dll in C# .NET 4.0 and the code I'm using is below
string strStatus = "";
strStatus = HttpContext.Current.Request.QueryString["status"];
string Lat = HttpContext.Current.Request.QueryString["lat"];
string Lon = HttpContext.Current.Request.QueryString["long"];
string strToken = "XXXX";
string strUpdateText = "We've received a report of a problem with " + strStatus + ".";
var client = new FacebookClient(strToken);
Dictionary<string, object> WallPost = new System.Collections.Generic.Dictionary<string, object>();
WallPost.Add("message", strUpdateText);
WallPost.Add("link", "http://maps.google.co.uk/maps?q=" + Lat + "+" + Lon);
WallPost.Add("name", "View On A Map");
WallPost.Add("picture", "http://www.westberks.gov.uk/images/common/googlemapicons/service_status/highway_009966.png");
WallPost.Add("caption", "View a map of the location of the reported problem");
WallPost.Add("description", " ");
WallPost.Add("problem", "http://samples.ogp.me/10150293874562522");
var response = client.Post("/290203581014564/westberksconnect:report", WallPost);
Does anyone know why I'm getting this error and do they have a solution to it please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的代码对我来说看起来是正确的。您需要提交您的操作以获得批准。
https://developers.facebook.com/docs/opengraph/opengraph-approval/
不幸的是,我等待我的批准已经有一段时间了。
Your code looks correct to me. You neeed to submit your action for approval.
https://developers.facebook.com/docs/opengraph/opengraph-approval/
Unfortunately, i've been waiting for mine to be approved for a while now.