1

I'm a new android developer using facebook sdk to login in a Fragment. I want to pass the Graphuser object to another activity which user can edit information and sign up to my app. this is my request method:

private void makeMeRequest(final Session session) {
    // Make an API call to get user data and define a
    // new callback to handle the response.
    final Request request = Request.newMeRequest(session,
            new Request.GraphUserCallback() {
                @Override
                public void onCompleted(GraphUser user, Response response) {
                    // If the response is successful
                    if (session == Session.getActiveSession()) {
                        if (user != null) {
                            Intent facebookUserIntent = new Intent(
                                    getActivity().getBaseContext(), Registration.class);
                        }
                    }
                    if (response.getError() != null) {
                        // Handle errors, will do so later.
                    }
                }
            });
    request.executeAsync();
}

I want to start the other activity and pass the object and get it on the other one after intent instantiate. Can anyone help please?

Ashkan.H
  • 121
  • 1
  • 10

1 Answers1

0

put you graphUser in Shared Preference or make a model extend GraphUser and impliment Serializable. Pass object of that Model

Pradeep Kumar
  • 777
  • 6
  • 21