Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Jonathan Etienne
Jonathan Etienne
24,572 Points

Google plus sign in with Parse

I am using Parse, and I am trying to have the user sign in user Google plus. Below is what I have been able to achieve so far:

googlePlusButton = (Button) findViewById(R.id.btnGSign); googlePlusButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {

            onGoogleButtonClicked();
        }

        private void onGoogleButtonClicked() {
    ParseUser.becomeInBackground("session-token-here", new LogInCallback() {
              public void done(ParseUser user, ParseException e) {
                    if (user != null) {
                      // The current user is now set to user.
                    } else {
                      // The token could not be validated.
                    }
                  }
                });
        }
    });

getting the session-tocken-here is where I am struggeling

If there is a better solution let me know