Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible small bug on Oauth2.php #52

Closed
JavierGonzalez opened this issue Jan 21, 2014 · 15 comments
Closed

Possible small bug on Oauth2.php #52

JavierGonzalez opened this issue Jan 21, 2014 · 15 comments
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@JavierGonzalez
Copy link

Hello there,

On this line 156, file "OAuth2.php":
https://github.com/google/google-api-php-client/blob/5c58413bba2301ef602d2a6650d4f5d82088ce64/src/Google/Auth/OAuth2.php#L156

It’s:

if (strpos($scope, 'plus.login') && strlen($rva) > 0) {

And should be:

if (strpos($scope, 'plus.login')!==false && strlen($rva) > 0) {

We also need a solution for issue 39, because the third example on https://developers.google.com/youtube/partner/code_samples/php#uploading_a_new_reference__so_youtube_can_automatically_generate_claims_for_newly_uploaded_videos_on_behalf_of_the_asset_s_owner isn’t working… Even if you put the YouTubePartner.php file to work along with the code, because this file isn’t on the repository yet.

Could you please have a look at it?

Best regards,

@ianbarber
Copy link
Contributor

plus.login can never be at the start of a scope string (it needs https://www.google etc.) so the line is correct.

The partner API is generated by the YouTube team and is not part of the main library. Please ask a question on SO (or update the previous one) for that type of support.

@JavierGonzalez
Copy link
Author

Ok, perfect.

Yes, we're waiting for an answer to continue our development, because there's a real mistake and nobody says anything for five days...

Could you please tell anybody to help us and correct the error on that example on developer's web?

Thank you very much for your time and concern.

@danieldou
Copy link

Could anybody solve this BIG problem? Does anybody notice that a code on Google Developers site actually doesn't work at all?

Any of the solutions we got aren't working:

In ALL of them, the file YouTubePartner.php is missing.

We're really trying hard to make that code working, but we only get not working patches!!

Please, anybody could fix this code once and forever?

@ianbarber
Copy link
Contributor

Daniel - I've pinged someone on YouTube, but unfortunately that API is not part of the public discovery doc: https://developers.google.com/discovery/v1/reference/apis - so it will never automatically generate into this library, you're always going to have to get it from YouTube. Sorry for the inconvenience, but we don't deal directly with the individual APIs, just the generic structure around them!

@danieldou
Copy link

Ok, I really hope that someone put the right code wherever it has to be.

So, where's the place to get the right code? Could you point us to there?

Thanks for your time!

@ianbarber
Copy link
Contributor

Thanks I appreciate this is frustrating, thought please also remember that the documentation you linked to is for a partner only programme, not generally available: https://developers.google.com/youtube/partner/. I believe the best place to go for the code is to ask a question on stack overflow: http://stackoverflow.com/questions/ask?tags=youtube-api

@ulukaya
Copy link

ulukaya commented Jan 24, 2014

If you go to the developer page, you'll see the content Id library binding. https://developers.google.com/youtube/partner/client_libraries

YouTubePArtner.php in https://developers.google.com/youtube/partner/clientlib/Google-youtubePartner-v1-20140110-php-1.0.0-alpha.zip

@danieldou
Copy link

@iulukaya Ibrahim, could you please read upper and figure out that YOU are the author of those codes and they're NOT WORKING?

@ianbarber Ian, we ask there twice ( http://stackoverflow.com/questions/21278909/example-code-not-working-on-php-developers-site/21329792#21329792 and http://stackoverflow.com/questions/21024694/youtubepartner-php-not-found?rq=1 ) and we only get patches and 'solutions' from Ibrahim that aren't working. We told him, but he never answer back with a real working solution.

We also ask here twice with no solution.

I would be a little worried if I'd see my code not working on a official Google site... Is there anybody responsible for that?

Is there anybody able to fix it?

@ulukaya
Copy link

ulukaya commented Jan 27, 2014

Hi Ian,
Code was working earlier and it still works for me with the version cuts I have. I believe "not stripping nulls" bug repeated later again with recent changes.

@ianbarber
Copy link
Contributor

Ibrahim: but the sample works for you with master or beta right? If not and
there is another null stripping bug raise an issue and I'll have a look.
On 27 Jan 2014 18:36, "Ibrahim Ulukaya" [email protected] wrote:

Hi Ian,
Code was working earlier and it still works for me with the version cuts I
have. I believe "not stripping nulls" bug repeated later again with recent
changes.


Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-33405691
.

@ianbarber
Copy link
Contributor

Additionally: I don't think I can call the partner API as it's non-public,
so if you can repro would it be OK to try and generate a similar error
against the public api? I can use that for a test for future versions then.
On 27 Jan 2014 20:29, "Ian Barber" [email protected] wrote:

Ibrahim: but the sample works for you with master or beta right? If not
and there is another null stripping bug raise an issue and I'll have a
look.
On 27 Jan 2014 18:36, "Ibrahim Ulukaya" [email protected] wrote:

Hi Ian,
Code was working earlier and it still works for me with the version cuts
I have. I believe "not stripping nulls" bug repeated later again with
recent changes.


Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-33405691
.

@danieldou
Copy link

We're happy to see that you're now trying to work it out. Please, tell us if and how could we help you.

Thanks for your time.

@ulukaya
Copy link

ulukaya commented Jan 28, 2014

Reproduced the error, it's the same as previous bug.
I'll try to create it on a public API for tests

ianbarber pushed a commit to ianbarber/google-api-php-client that referenced this issue Jan 29, 2014
Array and Map types weren't be recursively converted, so we
would be returning the raw object. This could lead to nulls or
other unexpected data being sent. Should resolve the underlying issue
for googleapis#52
@ianbarber
Copy link
Contributor

Think I see the issue! Have added tests and a fix in #71

@ulukaya
Copy link

ulukaya commented Jan 29, 2014

Yes, verified that Ian's fix solves the problem.
If you need the fix immediately, you can use his branch.
https://github.com/ianbarber/google-api-php-client

@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

5 participants