Page does not exist when deleting a list


#1

I’m calling the API 1.1 from my android app (*) with the following POST
api.twitter.com/1.1/lists/destroy.json
with “the owner_screen_name” and “slug” parameters,
but I’m getting
{“errors”:[{“code”:34,“message”:“Sorry, that page does not exist.”}]}
Please, help me, thanks

Relevant code

		DefaultHttpClient client = new DefaultHttpClient();	
	//String response="";
	ResponseHandler<String> responseHandler = new ResponseHandler<String>() {
		@Override
		public String handleResponse(org.apache.http.HttpResponse response)
				throws ClientProtocolException, IOException {
			// TODO Auto-generated method stub
			return EntityUtils.toString(response.getEntity());
		}
	    };
	
	String server_reply="";
	try {
		server_reply = client.execute(post, responseHandler); //new BasicResponseHandler());
	} catch (ClientProtocolException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
		server_reply+=" - "+e.getMessage();
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
		server_reply+=" - "+e.getMessage();
	}

(*)
My App is open sourced on GitHub and Assembla and free on Google Play
GitHub issue
Assembla ticket


#2

Important edit.
I’m getting the error only when an underscore _ is present in the list name, the slug parameter.
I will double check if that’s my own code fault in the meantime.


Replacing the underscore “_” with a dot “-” in the slug parameter does the trick.
I think this is a workaround and not a solution, because I see it as a bug in this specific Twitter’s API: in fact the same underscore in the slug does work when the list is created.


#3

Thanks for the report, and glad you’ve got things working.


#4

I confirm that it is working. The point is that the create API accept a “name” for the list (so actually it is not the slug!) that can contain an underscore but in the returned result one can see the “uri” and the “slug” with the dot :slight_smile:


#5