midoalone / google-api-php-client

Automatically exported from code.google.com/p/google-api-php-client
Apache License 2.0
1 stars 0 forks source link

YouTube Analytics API, approval_prompt force issue #365

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Click on authorization image, will pop up login
2. Login, will show Accept or Decline Message
3. After you accept once and reconnect, will just automatically process without 
asking you to accept.

What is the expected output? What do you see instead?

I want it to ask the user to accept or cancel the authorization every time they 
connect, instead of automatically going through the approval when already done 
once.

What version of the product are you using? On what operating system?

Latest, v3 api.

Please provide any additional information below.

The url i get is

https://accounts.google.com/o/oauth2/auth?immediate=false&response_type=token&sc
ope=https://www.googleapis.com/auth/yt-analytics.readonly+https://www.googleapis
.com/auth/youtube.readonly&redirect_uri=postmessage&proxy=oauth2relay564743325&s
tate=227274555%7C0.2914116445&origin=http://localhost&client_id=272630258892.app
s.googleusercontent.com&authuser=0&hl=en&from_login=1&as=-288345b2c3e91859

I need it to automatically add the approval_force parameter, not too sure how 
to go by this 

Original issue reported on code.google.com by rawsgam...@gmail.com on 8 Aug 2013 at 2:38

GoogleCodeExporter commented 8 years ago
Call setApprovalPrompt on the client object before generating the URL. 

Original comment by ianbar...@google.com on 8 Aug 2013 at 2:41

GoogleCodeExporter commented 8 years ago
But isnt that automatically set by default? 

Original comment by rawsgam...@gmail.com on 8 Aug 2013 at 3:01

GoogleCodeExporter commented 8 years ago
Believe it defaults to auto rather than force.

Original comment by ianbar...@google.com on 8 Aug 2013 at 3:05

GoogleCodeExporter commented 8 years ago
Im sure its set to force for me,looking through the files i can only see force, 

Original comment by rawsgam...@gmail.com on 8 Aug 2013 at 3:09

GoogleCodeExporter commented 8 years ago
Did adding the function call not work then? If not, please post a minimal 
sample reproducing the problem and we can investigate from there. 

Original comment by ianbar...@google.com on 8 Aug 2013 at 3:24

GoogleCodeExporter commented 8 years ago
I actually didnt create the thing im using, i purchased it, and when i mean 
purchased i dont mean i purchased the api client, i purchased someone to make a 
automatic API for a youtube partnership application, in which file do i look 
for to see whether its set to auto or force, i looked through the 
Google_OAuth2.php file and i saw public $approvalPrompt = 'force';

Where should i add the call function?

Original comment by rawsgam...@gmail.com on 8 Aug 2013 at 5:03

GoogleCodeExporter commented 8 years ago
You should put it wherever the Google_Client object is created (that's the 
$client-> i was referring to). Around there there's likely a bit where it's 
loading the client ID either with a setClientId() call or via a config - if you 
add it before the Youtube service is added to the client, that should work. 

Original comment by ianbar...@google.com on 12 Aug 2013 at 12:09

GoogleCodeExporter commented 8 years ago
Issue 366 has been merged into this issue.

Original comment by ianbar...@google.com on 12 Aug 2013 at 12:10

GoogleCodeExporter commented 8 years ago

Original comment by ianbar...@google.com on 12 Aug 2013 at 12:10

GoogleCodeExporter commented 8 years ago
This issue tracker is now closing. Development on the Google PHP client library 
moved to GitHub with the release of the 1.0.0-alpha, and now the 1.0 branch has 
reached beta status there will be no further releases of the 0.6 branch of the 
library. 

Please take a look at the latest version on 
https://github.com/google/google-api-php-client

For information on migrating, please take a look at this guide: 
https://developers.google.com/api-client-library/php/guide/migration

For general library support please ask a question on StackOverflow: 
http://stackoverflow.com/questions/tagged/google-api-php-client

If you are looking for support with a specific API, please contact the team 
working with that API via StackOverflow or their preferred support mechanism. 

If your issue still exists with the new version of the library, please raise a 
bug in the GitHub issue tracker with a minimal code sample. 

Thanks!

Original comment by ianbar...@google.com on 22 Jan 2014 at 4:53