JTwitter icon indicating copy to clipboard operation
JTwitter copied to clipboard

direct_message destroy call fails

Open hemantrajput opened this issue 11 years ago • 1 comments

Implementation for deleting a direct message is different from the twitter api. Twitter rest api expects direct message id as post parameter not in the url itself. Every time I'm getting this error message --code 34: Sorry, that page does not exist https://api.twitter.com/1.1/direct_messages/destroy/176917417644138497.json

hemantrajput avatar Mar 27 '14 10:03 hemantrajput

correct implementation for destroy message method which is in compliance to the twitter api-

public void destroyMessage(Number id) {
       HashMap<String, String> vars = new HashMap<String, String>();
        vars.put("id", ""+id);
        String page = post(TWITTER_URL + "/direct_messages/destroy.json", vars, true);
    assert page != null;
}

hemantrajput avatar Apr 08 '14 12:04 hemantrajput