And also, you need to create a Twitter's account. Using an OleObject object, try this simple script:
Integer i
OleObject oleTwitter
OleTwitter = CREATE OLEObject
i = oleTwitter.ConnectToNewObject("Msxml2.XMLHTTP")
if i = 0 then
oleTwitter.Open("POST", "http://youraccount:yourpassword@twitter.com/statuses/update.xml?status=Just for #..., Twitt from Powerbuilder", False)
oleTwitter.setRequestHeader("Content-Type", "text/xml")
oleTwitter.Send()
OleObject oleTwitter
OleTwitter = CREATE OLEObject
i = oleTwitter.ConnectToNewObject("Msxml2.XMLHTTP")
if i = 0 then
oleTwitter.Open("POST", "http://youraccount
oleTwitter.setRequestHeader("Content-Type", "text/xml")
oleTwitter.Send()
else
MessageBox("Error","Cannot connect to Object"
end if
Please beware, I don't give a guarantee for any security matters that will caused for your Twitter's account, since I don't have any deep experiences using the XML.
And this is the result:
how to add msxml2.dll to powerbuilder? sorry newbie.
ReplyDelete