I use Parse, where users can connect to Facebook, Twitter and Google+. At the moment, only Facebook and Twitter are fully operational.
I managed to log in using Facebook and Twitter as follows:
private void onLoginButtonClicked() { LoginActivity.this.progressDialog = ProgressDialog.show( LoginActivity.this, "", "Logging in...", true); List<String> permissions = Arrays.asList("public_profile", "user_about_me", "user_relationships", "user_birthday", "user_location"); ParseFacebookUtils.logIn(permissions, this, new LogInCallback() { @Override public void done(ParseUser user, ParseException err) { LoginActivity.this.progressDialog.dismiss(); if (user == null) { Log.d(IntegratingFacebookTutorialApplication.TAG, "Uh oh. The user cancelled the Facebook login."); } else if (user.isNew()) { Log.d(IntegratingFacebookTutorialApplication.TAG, "User signed up and logged in through Facebook!"); showUserDetailsActivity(); } else { Log.d(IntegratingFacebookTutorialApplication.TAG, "User logged in through Facebook!"); moodpage(); } } }); } private void onTwitterButtonClicked() { ParseTwitterUtils.logIn(this, new LogInCallback() { @Override public void done(ParseUser user, ParseException err) { if (user == null) { Log.d("MyApp", "Uh oh. The user cancelled the Twitter login."); } else if (user.isNew()) { Log.d("MyApp", "User signed up and logged in through Twitter!"); showUserDetailsActivity(); } else { Log.d("MyApp", "User logged in through Twitter!"); moodpage(); } } }); }
I'm trying to figure out how to do this using Google+. Someone suggested I look into the Parse Rest API, but I am not familiar with it and need more detailed recommendations.
Any clarification would be appreciated.
source share