【问题标题】:AppRequest Invalid access token with last Unity facebook SDKAppRequest 最后一个 Unity facebook SDK 的访问令牌无效
【发布时间】:2014-08-27 20:42:20
【问题描述】:

我在 Unity 游戏中使用了很多应用程序请求,效果很好。我刚刚更新到 Sdk 6.0,现在当我发送应用请求时出现错误: {"error_code":"100","error_message":"Invalid+access_token"}

其他 FB Api 调用工作正常,登录时没问题,我可以检索朋友和东西,所以我的访问令牌似乎工作。但显然不是 FB.AppRequest,我不知道是否应该将它作为参数传递给某个地方。

有什么想法吗? 谢谢!

【问题讨论】:

  • 已解决此问题。我正在为此苦苦挣扎。
  • 我不得不降级到旧版本...

标签: facebook sdk unity3d


【解决方案1】:

我将这个答案留给以后的搜索。

我终于找到了问题所在。翻遍FB类,发现出现这种错误的方法改成了:

public static void AppRequest(
        string message,
        OGActionType actionType,
        string objectId,
        List<object> filters = null,
        string[] excludeIds = null,
        int? maxRecipients = null,
        string data = "",
        string title = "",
        FacebookDelegate callback = null)

public static void AppRequest(
        string message,
        string[] to = null,
        List<object> filters = null,
        string[] excludeIds = null,
        int? maxRecipients = null,
        string data = "",
        string title = "",
        FacebookDelegate callback = null)

public static void AppRequest(
        string message,
        OGActionType actionType,
        string objectId,
        string[] to,
        string data = "",
        string title = "",
        FacebookDelegate callback = null)

我错过了一些看起来像 facebook 需要创建格式良好的 url 的参数。最后像下一个一样发送一个apprequest,一切正常。

            FB.AppRequest(
                "Agregar amigos", 
                null,
                "",
                null,
                "{}", 
                "Amigo invisible", 
                appRequestCallback
                );

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-06-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-18
    • 2013-02-27
    相关资源
    最近更新 更多