【问题标题】:Facebook Graph Api search in androidandroid中的Facebook Graph Api搜索
【发布时间】:2015-02-21 07:33:45
【问题描述】:

只想通过graph api中的新请求搜索特定位置的所有事件,但抛出错误。

 //Request for events
                   new Request(
                            session,
                            "/search?q=dubai&type=event",
                            null,
                            HttpMethod.GET,
                            new Request.Callback() {
                                public void onCompleted(Response response) {
                                    System.out.println("Result: " + response.toString());


                                }
                            }
                    ).executeAsync();

权限:-

authButton.setPublishPermissions("publish_actions","manage_pages");

输出:-

Result: {Response:  responseCode: 400, graphObject: null, error: {HttpStatus: 400, errorCode: 100, errorType: GraphMethodException, errorMessage: Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api}, isFromCache:false}

建议一些方法来解决它。

【问题讨论】:

    标签: android facebook-graph-api sdk


    【解决方案1】:
    new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{event-id}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
    

    ).executeAsync();

    希望对您有所帮助,详情请点击以下链接

    https://developers.facebook.com/docs/graph-api/reference/event/
    

    【讨论】:

      【解决方案2】:

      试试这个新的 API,希望对你有帮助。

      Graph Event API

      Graph API

      【讨论】:

        【解决方案3】:

        【讨论】:

        • 我只是在图形 api explorer 中实现了查询,但是当我通过应用程序获取请求时,它似乎不起作用。
        • 是的,我也遇到过这个问题。所以我说请一步一步地按照给定的链接。会有帮助的。
        • 我仍然没有得到结果为什么这个请求方法不起作用....你能告诉我搜索查询与我的一样发送吗?
        • 我得到了很多在图形资源管理器上工作的参数,但我不知道如何在 android app.plz 的请求方法中传递它们。请以任何方式帮助我。
        • 嘿,我没有得到问题..请帮帮我。没有关于 android 中的图形 api 搜索的查询。
        猜你喜欢
        • 1970-01-01
        • 2022-12-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多