mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 16:05:51 +03:00
[GH-ISSUE #88] Issue with basic example and displaying user details #44
Labels
No labels
bug
docs
enhancement
enhancement
enhancement
feedback wanted
good first issue
help wanted
help wanted
help wanted
invalid
pull-request
question
question
upstream
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-web-api-php#44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Pau1fitz on GitHub (Jun 10, 2017).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/88
I am working on the basic examples in the docs which is strangely not showing the user's profile on the front end.
I have taken a couple of approaches but cannot get it working.
The code is the basic example and looks like this:
The url looks like
http://url/index.html?code=AQCH5_yl4bOPEvRaMfwQjpdm6esTfkUVwmZ5NEFlD0L9sfmst5-8FmwK0puU_9kI8yOK5i0uLUSYH00dW3kvl_gPCG0ARpgNaAdDoVTF33oOVY-qkh-EG3TRvmYj2u1c9qVAM8ea_g4JL7LOUPyQTdEPSFFwykpU_YCGzOo2grd0jR_Cu6L9DflC-xlappmP_yvFNLiXLzmS-qJIyla1g_NKfYZQJykGqKjozoBnJrBLDcllwNOwQ1pRRo2mI would have thought the php code would handle exchanging the code for a token but this doesn't appear to be happening.
@jwilsson commented on GitHub (Jun 10, 2017):
Hi!
What's happening when you run the code? Do you get any error messages? Is the code interpreted as PHP (I'm asking since you're using
.html-files)?@Pau1fitz commented on GitHub (Jun 10, 2017):
I have not got any error messages. I have also tried by using two
phpfiles. One of the filesstep1was used to to request access to the user's account and nd redirecting them to your app's authorize URL (step2.php)When I made this attempt I had a
step1.phpthat looked like this:then my
step2.phpfile looked like this:@jwilsson commented on GitHub (Jun 12, 2017):
Hmm, are you using an absolute URL as the redirect uri? For example
http://localhost/test.phpin both the application you created at Spotify's developer site and in your code? Make sure they're an exact match, trailing slashes and everything. If they differ, that might be the issue.Otherwise, I don't know what the problem might be. I can't see anything wrong with your code. It should work.
@Pau1fitz commented on GitHub (Jun 12, 2017):
it worked! typical! don't actually think there was any issue. just wasn't working for some reason :-) thanks for your help!
@jwilsson commented on GitHub (Jun 12, 2017):
Great! Glad that we got it working!