【问题标题】:Error When Using Custom Open Graph Action使用自定义打开图形操作时出错
【发布时间】:2012-01-11 16:01:14
【问题描述】:

我收到了错误

此操作不允许设置用户消息,因为此属性 未请求批准。

对于我已提交审批的自定义 Open Graph Action Type 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);

有谁知道我为什么会收到这个错误,请问他们有解决方案吗?

【问题讨论】:

    标签: c#-4.0 facebook-opengraph


    【解决方案1】:

    您的代码在我看来是正确的。您需要提交您的操作以供批准。 https://developers.facebook.com/docs/opengraph/opengraph-approval/

    不幸的是,我一直在等待我的批准。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-18
      • 1970-01-01
      相关资源
      最近更新 更多