3

因此,过去几天我一直在尝试将 Facebook 签到功能集成到我的 Android 应用程序中,到目前为止,我只能获得身份验证过程并发布到墙上的工作。我一直坚持使用 Open Graph 有一段时间了。

我目前在我的 Facebook 应用程序上创建了 1 个对象类型和 1 个操作类型。

对象类型:飞行

操作类型:签到

我正在尝试与这些对象交互,但我不断收到这些错误;响应:{"error":{"message":"(#100) 参数对象是必需的","type":"OAuthException","code":100}}

对于以下代码:

Bundle params = new Bundle();

params.putString("title", flightNumber);
params.putString("description", flightInfo);

                            Utility.mAsyncRunner.request("me/objects/flightinfoapp:flight", params, "POST",
                                    new placesCheckInListener(), null);

& 当我将“type”作为参数包含在 Facebook 应用程序的 Open Graph 代码生成器生成的参数中时,我收到此错误;响应:{"error":{"message":"无法在路径和查询参数中指定类型。","type":"OAuthException","code":2500}}

对于以下代码:

捆绑参数 = 新捆绑();

params.putString("type", "flightinfoapp:flight");
params.putString("title", flightNumber);
params.putString("description", flightInfo);

                            Utility.mAsyncRunner.request("me/objects/flightinfoapp:flight", params, "POST",
                                    new placesCheckInListener(), null);

如果有人可以帮助我,我将不胜感激!提前非常感谢!

4

1 回答 1

0

问题是您将对象的内容作为参数发送,如

{title:flightNumber,description:flightInfo}

但是您应该将对象及其内容作为参数发送,如

{object:{title:flightNumber,description:flightInfo}}
于 2013-12-02T17:02:25.517 回答