Posts: 1,271
Threads: 399
Joined: Mar 2003
Twitter API Wiki
i need a qm twitter client.
title and text fields should be richtext.
Posts: 1,271
Threads: 399
Joined: Mar 2003
Posts: 1,271
Threads: 399
Joined: Mar 2003
Posts: 1,271
Threads: 399
Joined: Mar 2003
Posts: 1,271
Threads: 399
Joined: Mar 2003
best link so far:
Twitter API - Submit a post in C#
Macro
[OperationContract]
public void SubmitUserStatus(string username, string tweet)
{
,// encode the username/password
,string user = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(username + ":" + password));
,// determine what we want to upload as a status
,byte[] bytes = System.Text.Encoding.ASCII.GetBytes("status=" + tweet);
,// connect with the update page
,HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://twitter.com/statuses/update.xml");
,// set the method to POST
,request.Method = "POST";
,// thanks to argodev for this recent change!
,request.ServicePoint.Expect100Continue = false;
,// set the authorisation levels
,request.Headers.Add("Authorization", "Basic " + user);
,request.ContentType = "application/x-www-form-urlencoded";
,// set the length of the content
,request.ContentLength = bytes.Length;
,// set up the stream
,Stream reqStream = request.GetRequestStream();
,// write to the stream
,reqStream.Write(bytes, 0, bytes.Length);
,// close the stream
,reqStream.Close();
}
Posts: 12,074
Threads: 141
Joined: Dec 2002
Like Http.Post.
Function
TweetSubmitUserStatus
;/
function $username $tweet $password
str user.encrypt(4 _s.from(username ":" password) "" 3)
str status.from("status=" tweet)
Http h.Connect("twitter.com")
h.Post("statuses/update.xml" status 0 _s.from("Authorization: Basic " user))
not tested