使用PHP使用API​​删除soundcloud上的曲目

I'm trying to delete a track on soundcloud via their API. I'm using the Njasm php library for sound cloud (not an official one as I don't think they have an official one).

I can upload fine but I'm not 100% sure how to delete a track.

I have this:

$params = array("id"=>255008920);                

$response = $facade->delete("/tracks", $params);   

But this does not seem to delete the track.

What do I have to use (even if it's not based on the Njasm library) to delete a track?

I'm the creator of the njasm library. First of all thanks for using it.

In regard to your question: You are calling the right method with the right parameters, but you need to call the

request()

method in the end, to invoke the API. Assumming you're authenticated.

Example:

$facade = new SoundcloudFacade($clientID, $clientSecret);
$facade->userCredentials($username, $password);
$params = ["id" => 12345];
$response = $facade->delete('/tracks')->request();
// or
$facade->delete('/tracks');
$facade->setParams($params);
$response = $facade->request();

Hope it helps.

To use delete functionality you will need to use OAuth authentication.

This might point you in the right direction

https://apigee.com/console/soundcloud?apig_cc=1