File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,14 @@ public function __construct($config)
28
28
/**
29
29
* Swap an auth code for an access token & a refresh token
30
30
* @param {String} $authCode The auth code as provided by the Spotify API
31
- *
32
- * @return {Array} An array containing the 'access_token', 'token_type',
31
+ *
32
+ * @return {Array} An array containing the 'access_token', 'token_type',
33
33
* 'expires_in', 'refresh_token' and 'scope' fields
34
34
*/
35
35
public function swapAuthCode ($ authCode )
36
36
{
37
37
$ ch = curl_init ("https://accounts.spotify.com/api/token " );
38
-
38
+
39
39
// Uses POST verb
40
40
curl_setopt ($ ch , CURLOPT_POST , 1 );
41
41
@@ -55,6 +55,6 @@ public function swapAuthCode($authCode)
55
55
$ response = curl_exec ($ ch );
56
56
curl_close ($ ch );
57
57
58
- return json_decode ($ response );
58
+ return json_decode ($ response, true );
59
59
}
60
- }
60
+ }
You can’t perform that action at this time.
0 commit comments