簡體   English   中英

Facebook Graph Api在android中搜索

[英]Facebook Graph Api search in android

只想在圖形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}

提出一些解決方法。

試試這個新API,希望對您有所幫助。

圖形事件API

圖API

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/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM