I try to get my birthday date using deprecated Plus.API
. I request scopes: Plus.SCOPE_PLUS_PROFILE
, Plus.SCOPE_PLUS_LOGIN
and Scope("https://www.googleapis.com/auth/user.birthday.read")
.
I even got dialog from Google Plus, that app request full birtday date. But wth I got response with null birthady even if it is pblic on mu G+ page?
Code:
public static final Scope SCOPE_PLUS_BIRTHDAY = new Scope("https://www.googleapis.com/auth/user.birthday.read");
GoogleSignInOptions gso = new GoogleSignInOptions
.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.requestId()
.requestProfile()
.requestScopes(SCOPE_PLUS_BIRTHDAY, Plus.SCOPE_PLUS_PROFILE, Plus.SCOPE_PLUS_LOGIN)
.build();
mGoogleApiClient = new GoogleApiClient.Builder(mActivity)
.enableAutoManage(mActivity, this)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.addApi(Plus.API)
.build();
Response:
[{value='antoxa2584@gmail.com', key='email', parentId=null}, {value='Антон Артемов', key='name', parentId=null}, {value='https://plus.google.com/100328752299073028996', key='url', parentId=null}, {value='https://lh4.googleusercontent.com/-WNQOIPjFjtY/AAAAAAAAAAI/AAAAAAAAP7E/LjtF7njMedE/photo.jpg?sz=50', key='photo_url', parentId=null}, {value='0', key='age_range_max', parentId=null}, {value='21', key='age_range_min', parentId=null}, {value='null', key='about_me', parentId=null}, {value='null', key='birthday', parentId=null}, {value='null', key='location', parentId=null}, {value='male', key='gender', parentId=null}, {value='ru', key='language', parentId=null}, {value='null', key='nick_name', parentId=null}, {value='0', key='relat_status', parentId=null}]