Jithin Sunny
Jithin Sunny

Reputation: 3402

Android New Facebook SDK Exception in Graph Request

Session currentSession = Session.getActiveSession();
if (currentSession.isOpened()) {

        Request req = new Request(currentSession, "/me/friends?fields=id,name,installed,picture",null, HttpMethod.GET,
                new Callback() {

            @Override
            public void onCompleted(Response response) 
            {
               //CODE..
            }
        });
        Request.executeBatchAsync(req);
}

Got response like this.

{Response:  responseCode: 400, graphObject: null, error: {HttpStatus: 400, errorCode: 2500, errorType: OAuthException, errorMessage: An active access token must be used to query information about the current user.}, isFromCache:false}

Whats wrong with this code.

Permission provided are "publish_stream","user_likes","email","user_birthday","user_interests","user_friends"

Upvotes: 0

Views: 655

Answers (1)

Jithin Sunny
Jithin Sunny

Reputation: 3402

Got the result.Thanks @Jesse Chen

Bundle params() = new Bundle();
params.putString("fields", "id,name,installed,picture");
Request req = new Request(session, "me/friends", params, HttpMethod.GET..

Upvotes: 3

Related Questions