2017-03-13 51 views
0

有没有方法通过API设置SoundCloud用户的描述?我们有一个音乐家“日期”的应用程序,并希望自动添加日期到用户的个人资料。通过API设置/编辑SoundCloud用户的描述

我们该怎么做?如果您使用的是PHP

<script> 
SC.initialize({ 
    client_id: 'your_client_id', 
    redirect_uri: 'your_callback_url' 
}); 

SC.connect().then(function() { 
    SC.put('/me', { 
    user: { description: 'the new description' } 
    }); 
}); 
</script> 

,前提是你使用的SoundCloud的文档,你可以:

回答

2

如果您正在使用Javascript,您通过身份验证的用户后,可以更改用户使用此功能的说明是这样做的:

user = client.post('/me', :description => 'I am using the SoundCloud API!') 
puts user.description 

欲了解更多信息,你可以去这里: https://developers.soundcloud.com/docs#authentication。向下滚动到部分

希望我帮助

的“关于身份验证的用户 获取信息”