public String unfollowUser(Status status) throws Exception { try { NullParser parser = new NullParser(); String url = FRIENDSHIPS_DESTROY_URL + status.getScreenName() + ".xml"; xauth.xAuthWebRequest(true, url, null, parser); return parser.getResponse(); } catch (Exception ex) { throw ex; } }
public void activateStatusMenuItem() { int selectedIndex = statusMenu.getSelectedIndex(); Status selectedStatus = statusList.getSelected(); if (selectedIndex == 0) { if (selectedStatus != null) { selectedStatus.openInBrowser(controller.getMIDlet()); return; } } else if (selectedIndex == 1) { if (selectedStatus != null) { selectedStatus.openIncludedLink(controller.getMIDlet()); return; } } else if (selectedIndex == 2) { if (selectedStatus != null) { controller.showStatusView("@" + selectedStatus.getScreenName() + " "); } } else if (selectedIndex == 3) { /** Cancel = Do nothing */ } }
public Status markAsUnfavorite(Status status) { try { StatusFeedParser parser = new StatusFeedParser(); String url = FAVORITE_DESTROY_URL + status.getId() + ".xml"; xauth.xAuthWebRequest(true, url, null, parser); // HttpUtil.doPost( url, parser ); Vector statuses = parser.getStatuses(); if (statuses != null && statuses.isEmpty() == false) { return (Status) statuses.elementAt(0); } } catch (Exception ex) { return new Status( "Twim", "Error while marking status as unfavorite: " + ex.getMessage(), Calendar.getInstance().getTime(), "0"); } return null; }