How do I get the SoundCloud Follow button on my website?
3 answers
Looks like SoundCloud has opened up functionality for the "following" through their API
Unfortunately, while they closed new apps from registration with their API ... not sure when / if this will open.
+1
source to share
Thanks to @ davidpm4 - it works now with updated here
Here is the authorization. the code for the popup:
<script src="https://connect.soundcloud.com/sdk/sdk-3.3.0.js"></script>
<script>
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'http://example.com/callback'
});
// initiate auth popup
SC.connect().then(function() {
return SC.get('/me');
}).then(function(me) {
alert('Hello, ' + me.username);
});
</script>
This is for the callback:
<script src="https://connect.soundcloud.com/sdk/sdk-3.3.0.js"></script>
<script>
SC.initialize({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'http://example.com/callback'
});
SC.connect().then(function() {
// Follow user with ID 3207
SC.put('/me/followings/3207').then(function(){
// Unfollow the same user
SC.delete('/me/followings/3207');
});
});
</script>
0
source to share
For SoundCloud, you can customize the icon here - https://soundcloud.com/pages/embed
-2
source to share