Last active
December 25, 2016 15:59
-
-
Save codeaholicguy/3608c54db1a1d8b028686810afc14ba1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SoundCloud from 'soundcloud'; | |
const API_HOST = '//api.soundcloud.com'; | |
export function auth() { | |
SoundCloud.connect().then((session) => { | |
fetchMe(session) | |
}); | |
} | |
function fetchMe(session) { | |
fetch(`${API_HOST}/me?oauth_token=${session.oauth_token}`) | |
.then((res) => res.json()) | |
.then((data) => { | |
console.log('me', data); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment