Question

So I tried the tutorial Codenameone provided on JSON parsing, but now when i try it out it gives me a 410:gone error.

I did google the error but didn't find anything in combination with java or codenameone and i don't really understand the meaning of this error.

This error is not only in netbeans as i expected but even the on android it gives this error.

Code below is the action performed after clicking the "get twitter"-button:

public void actionPerformed(ActionEvent evt) {
            ConnectionRequest request = new ConnectionRequest() {

                @Override
                protected void readResponse(InputStream input) throws IOException {
                    JSONParser parser = new JSONParser();
                    System.out.println(parser.parse(new InputStreamReader(input)));
                }

            };
            request.setUrl("http://search.twitter.com/search.json");
            request.setPost(false);
            request.addArgument("q", "@codenameone");
            NetworkManager manager = NetworkManager.getInstance();
            manager.start();
            manager.addToQueue(request);
        }
    });
Was it helpful?

Solution

The JSON tutorial was written to the Twitter 1.0 API which was deprecated and completely removed a few months ago. Unfortunately the alternative is obtuse and painful to use, we need to issue a new tutorial with a new webservice however the gist of the tutorial still stands despite the fact that it no longer works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top