I’m trying to integrate Google Play Game Services (GPGS) in a Cocos2d-x game for Android and iOS.
I’ve already incorporated the C++ SDk successfully and can log-in the user on Android. Now, I would like to construct a profile for the user, but player object in GPGS does not have sufficient information.
I know that in the Java version of the SDK, I can request additional permissions by calling the addApi and addScope methods on the builder object;
Java
GoogleApiClient.Builder builder = new GoogleApiClient.Builder(
mActivity, this,this).addApi(Plus.API).addScope(Plus.SCOPE_PLUS_PROFILE).build();
And then, fetching the G+ profile like so;
Java
Person currentPerson = Plus.PeopleApi.getCurrentPerson(mGoogleApiClient);
My question now would be that if the C++ SDK supports a similar feature for fetching the user’s google plus profile. I observed that the C++ equivalent of the builder factory object has an equivalent addOauthScope method which can be used to request G+ permissions, like so;
C++
gameServices = gpg::GameServices::Builder()
.AddOauthScope("https://www.googleapis.com/auth/plus.me");
but there’s nothing in the documentation about how to make requests after the permission is obtained (access_token is never exposed by the api to my knowledge).
Is there something I’m missing? None of the available documentation seems to address this.