public static void sendMessage(String toNumber, String body) throws TwilioRestException { List<org.apache.http.NameValuePair> params = new ArrayList<org.apache.http.NameValuePair>(); params.add(new BasicNameValuePair("Body", body)); params.add(new BasicNameValuePair("To", toNumber)); params.add(new BasicNameValuePair("From", SMS_CENTER)); MessageFactory messageFactory = client.getAccount().getMessageFactory(); Message message = messageFactory.create(params); System.out.println(message.getSid()); }
public NameValuePairHolder(NameValuePair a_value) { value = a_value; }