Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drsounds/spotify-web-api-wrapper-php
PHP wrapper for the Spotify web API
https://github.com/drsounds/spotify-web-api-wrapper-php
Last synced: 6 days ago
JSON representation
PHP wrapper for the Spotify web API
- Host: GitHub
- URL: https://github.com/drsounds/spotify-web-api-wrapper-php
- Owner: drsounds
- Created: 2014-06-17T10:20:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-13T21:04:25.000Z (about 10 years ago)
- Last Synced: 2024-04-14T11:43:12.099Z (7 months ago)
- Language: PHP
- Size: 206 KB
- Stars: 0
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
spotify-web-api-wrapper-php
===========================PHP wrapper for the Spotify web API
Work in progress.
# Getting started
Let say you have an php site in this folder,
Place the Spotify.php in your vendor, and create a basic api connection header
spotify.inc.php
Then create a login page, login.phpstartAuthorization($scope);
$spotifyApi->startAuthorization();
?>
Let say you created a callback.php in the same directory as the login.php, just create a callback.php there (assume the pages we create can be reached at http://localhost/)requestToken();
// Store the refresh token and access token in your database
$access_token = $token['access_token'];
$refresh_token = $token['refresh_token'];
// Then 'install' the token into the class instance
$spotifyApi->authorize($token['access_token']);
?>