Closed BillyCallahan closed 9 years ago
Some code is appreciated :)
Here it is :) https://github.com/AudricManaud/SpotifyAPI
Thanks!
I think your problem lies in a mismatch between the callback URI you've registered at Spotify and the one you're actually using.
In the screenshot, the URL seems to be http://localhost/promus/callback.php
but in the code you posted, the redirect URI is http://localhost/callback.php
. Try changing one of them, either the registered URI at Spotify or move the files so they're placed where Spotify expects them.
Alright, I've tried reproducing it but I can't find anything wrong with it.
Could you dump the whole response by adding something like
print_r($response);
on line 126 of Request.php
, right after the line
curl_close($ch);
and post the result here.
Hmm, try with
var_dump(curl_error($ch));
instead. But put it before the
curl_close($ch);
line.
Great, thanks!
At least we found the problem, cURL needs a local bundle of root certificates. Take a look at this answer: https://laracasts.com/discuss/channels/general-discussion/curl-error-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate/replies/37017 and restart your local server and it should work.
I hope to get a better fix for this into the library.
Oh my god, it works thank you very much ! You've been so helpful to me :+1: If you need to run some tests on my computer to solve it for everyone, just contact me :)
Audric.
Awesome!
Glad we figured it out :)
Seemed to be solved at first, but now stopped working again.
@rubenvdb Could you pull down the 0.9.0
branch, test with that code and then open a new issue with the error received.
Thanks!
Hello,
I think I'm having the same issue that https://github.com/jwilsson/spotify-web-api-php/issues/29. Here's my error:
So, when I launch index.php it asks me the authorization and when I say 'yes' I'm getting this. I have an another page callback.php which is called once the user clicks on 'yes'. These two pages only contain the code provided by you. I tried to run it on both Linux and Windows :)
If you need anything, ask me ! Thanks in advance, it's really important for me to solve this problem :+1:
Audric.