3

Just want to search all the events in a particular location by using new request in graph api,but error throws.

 //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();

Permission:-

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

output:-

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}

suggest some way to solve it.

Shashank singh
  • 641
  • 3
  • 14

3 Answers3

1

Try this new API, hope this help you.

Graph Event API

Graph API

Naveen Agarwal
  • 930
  • 7
  • 7
1
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{event-id}",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
    public void onCompleted(GraphResponse response) {
        /* handle the result */
    }
}

).executeAsync();

Hope it will help you, for detail go through below link

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

for facebook Api, please refer below its developer link: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2 https://developers.facebook.com/docs/graph-api/reference http://api-portal.anypoint.mulesoft.com/facebook/api/facebook-graph-api/docs/code

I hope it work.

Yogendra
  • 4,817
  • 1
  • 28
  • 21
  • I just implements the query in graph api explorer but when i get request through app it seems to not work. – Shashank singh Feb 21 '15 at 07:53
  • Yes i faced this issue for same. So that I am saying plz follow given link with step by step. it will help. – Yogendra Feb 21 '15 at 07:55
  • i stil not get the result why this request method is not working....can you tell me that the search query is send as same my mine. – Shashank singh Feb 21 '15 at 12:01
  • i am getting lots of parameters which are working on graph explorer but i am not getting how to pass them in request method for android app.plz help me inn any way. – Shashank singh Feb 21 '15 at 12:03
  • hey i didn't get the issue..plz help me out. there are no queries regarding graph api search in android. – Shashank singh Feb 23 '15 at 12:30
  • http://stackoverflow.com/questions/11181480/how-can-i-query-public-facebook-events-by-location-city – Yogendra Feb 23 '15 at 16:35
  • http://stackoverflow.com/questions/13409763/is-there-any-way-to-fetch-all-facebook-events-in-a-specific-city – Yogendra Feb 23 '15 at 16:36