2017-03-13 91 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。向下滾動到部分

希望我幫助

的「關於身份驗證的用戶 獲取信息」