android-google-signin-unity icon indicating copy to clipboard operation
android-google-signin-unity copied to clipboard

I need to get access to youtube api, so how can I set scope?

Open foritari opened this issue 7 years ago • 2 comments
trafficstars

Hi, i've downloaded your asset, and it's working for me, but I need somehow set scope, as example from google:

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
				.requestServerAuthCode(getString(R.string.server_client_id))
				.requestEmail()
				.requestScopes(new Scope("https://www.googleapis.com/auth/youtube.readonly"))
				.build();

Like in example above I need set scope, so user could give me access to youtube. Could you please help me and write how could I do it?

foritari avatar Jul 13 '18 10:07 foritari

@loukaspd as I see in this : #android-google-signin-unity/AndroidLibrary/app/src/main/java/gr/loukaspd/googlesignin/GoogleSignInFragment.java didn't add the ability to set scope somehow? Am I right?

foritari avatar Jul 13 '18 10:07 foritari

You are correct, you'll need to edit GoogleSignInFragment.java, rebuild and replace the jar inside Plugins/Android folder. What exactly do you want to do with youtube api? Can do that from Unity, or you will have to add all the functionality inside GoogleSignInFragment?

loukaspd avatar Jul 24 '18 19:07 loukaspd