J7mbo / twitter-api-php

The simplest PHP Wrapper for Twitter API v1.1 calls
MIT License
1.82k stars 802 forks source link

Couldn't delete a welcome message #261

Closed Nidalc closed 5 years ago

Nidalc commented 6 years ago

Hi everybody,

i use this library to interact withe the twitter api.

Here is my code used to delete a welcome_message :

$url = 'https://api.twitter.com/1.1/direct_messages/welcome_messages/destroy.json?id='.intval($message_id);

        $result = $this->twitter->buildOauth($url, "DELETE")->performRequest(true, [
            CURLOPT_HTTPHEADER => array('Content-Type:application/json'),
            CURLOPT_POSTFIELDS => json_encode(['id' => $message_id])
        ]);
        debug("DELETE WM");
        debug($result);

The result is empty, and when i list the welcome_messages, it is not deleted.

Thanks for your help.

J7mbo commented 5 years ago

As this is an old issue, I'm closing it, but if you still feel that something needs to be addressed, please feel free to reopen or open a new issue, I'll put it as a higher priority, and we'll solve it together! :)