I use the twitpic library to post the image on twitter, but I get an invalid username and password for twitpic. Is there any solution for this? What is witpic username and password. I just use my Twitter id and password instead.
Here is my code
// Create file File picture = new File(Environment.getExternalStorageDirectory()+"/image.jpg"); if(picture.exists()) { System.out.println("Picture accesseds"); } // Create TwitPic object and allocate TwitPicResponse object TwitPic tpRequest = new TwitPic("gauravarora90", "gaurav"); TwitPicResponse tpResponse = null; // Make request and handle exceptions try { tpResponse = tpRequest.uploadAndPost(picture, "Hello World!!!"); } catch (IOException e) { e.printStackTrace(); } catch (TwitPicException e) { e.printStackTrace(); } // If we got a response back, print out response variables if(tpResponse != null) { tpResponse.dumpVars(); System.out.println(tpResponse.getStatus()); if(tpResponse.getStatus().equals("ok")){ Toast.makeText(getApplicationContext(), "Photo posted on Twitter.",Toast.LENGTH_SHORT).show(); //picture.delete(); } }
Please help me. Thanks in advance.
source share