loukaspd / android-google-signin-unity

Google Sign-In API plugin for Unity, for Android build
MIT License
20 stars 5 forks source link

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

Open foritari opened 6 years ago

foritari commented 6 years ago

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 commented 6 years ago

@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?

loukaspd commented 6 years ago

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?