I was trying to follow a user using soundcloud api in php. But I am getting bellow error when i run the code.
Warning: Missing argument 2 for Services_Soundcloud::put(), called in /home/sumithost/public_html/test.php on line 12 and defined in /home/sumithost/public_html/Soundcloud.php on line 636
exception 'Services_Soundcloud_Invalid_Http_Response_Code_Exception' with message 'The requested URL responded with HTTP code 404.' in /home/sumithost/public_html/Soundcloud.php:941 Stack trace: #0 /home/sumithost/public_html/Soundcloud.php(645): Services_Soundcloud->_request('https://api.sou...', Array) #1 /home/sumithost/public_html/test.php(12): Services_Soundcloud->put('/me/followings/...') #2 {main}exception
My Code is below
require_once 'Soundcloud.php';
$client = new Services_Soundcloud('xxClient-IDxx', 'xxSecretKEYxx', 'http://sumithost.uni.me/sc.php');
$client->setAccessToken('xxAccess-Tokenxx');
try {
$client->put('/me/followings/3207');
} catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
echo $e;
}
?>
Using php sdk from here:https://github.com/mptre/php-soundcloud
I think error is in put-function of soundcloud.php:636