In this Premium Member tutorial we will learn how to create a cross-platform twitter client using REALbasic HTTPSocket Class. Our twitter client will also offer a option to insert short URL to twitter updates. Watch it, learn it, enjoy it!
We will use in this project controls: 2x StaticText, 1x TextArea, 1x TextField and 2x PushButton. Try to get results close to the screenshot below. Change in StaticText1 -> Appearance -> Text Value to What are you doing? and in StaticText2 change text to 140 and the Font to bold style. In TextArea1 change the property LimitText value to 140 (this way we will add a limit for character in this control). On bottom insert PushButton1 control and change it Caption to “Update on twitter”. Add also one TextField for our URL and one PushButton2 control with Caption “Insert Short URL”. You should get something like that:

Twitter allows using only 140 characters per update so we will create a character counter in our application. Go to TextArea1 Sub TextChange() and insert there the code.
1 | StaticText2.Text = CStr(140 - Len(TextArea1.Text)) |
CStr function converts the number to string and in () we count how many characters are left in our TextArea1 control. Len function give us how many character are in TextArea1 control.
If you see this message you probably want access special material for Premium Members (Source Files, Bonus Tutorials, free Classes and More). You can do this by subscribing REALbasic City site for 10 USD (access for 3 months). There is also a option to buy access only to this material. Login or register to get option to buy and support REALbasic City.
Log in
[...] http://realbasic.tutspolis.com/tutorials/pm-create-twittme-v2-a-twitter-client-in-realbasic/ [...]
If i want read the “http://twitter.com/statuses/friends_timeline.xml” result, how i do?
In this tutorial I show how to get this kind of data from twitter (login)… simply use Get method and display the result in a string (for example in TextArea1.Text). Next you must format it for your own needs.
If i want read the “http://twitter.com/statuses/friends_timeline.xml” result, how i do?