Livecode Twitter Client

Hi forum!

Thanks to this forum, specially to the user NickVoll who kindly helped me sending by the sources of his client, I've developed a simple client using Livecode to show live tweets on screen using Caspar CG.

Here an example:
However, right now I can only retrieve tweets by pressing the "refresh" button. I do that by launching a PHP script in my web server, then reading the result in a remote TXT file.

It works nicely but I'd like to build the client so Twitter "streams" the tweets to me. This way they will show in the client live when the viewers send them.

Any ideas how to do that?


Re: Livecode Twitter Client

ddonoghue wrote:Hi emisiona, you need to register and use twitter's api. they have a streaming api which should do what you want but there is a fair amount of work your client will have to do to work with it properly, such as throttling..
I already needed to authenticate in order to work with the API v1.1. I did it in php, saved the tweets in a text file and read it using livecode. The problem is to stream using livecode and not php, b/c I don't have any example of how to do the authentication in livecode.

I'll share this work once I have a final version :)


Re: Livecode Twitter Client

ddonoghue wrote:I haven't used livecode but what I said was correct.. you need to use the twitter streaming api. from a quick google search I found which may be of help to you but I haven't looked at it.
Hi ddonoghue!

I know you were right, I didn't mean to say the opposite :)

I know this example, but it makes use of the obsolete API v1.0. We need to use the API v1.1 and with the OAuth authentication model. I've already solved it in PHP but not in livecode...

I'll keep you all posted in case you are interested in my progress. And if you have any helpful advice, post it! :)


Re: Livecode Twitter Client

Hi all,

I found some time to work on my twitter client. I haven't solved the streaming part of the problem, but I found a way around as a first approach. I'm looking for new tweets every 20-30 seconds. The user chooses how long the program will wait until it asks for new tweets.
I also added image dowloading, both for user avatar and for media attached to the tweet.

Now it's time to build a nice template that shows the images. I still have to work on that, and in some problems with the images (they get mixed sometimes, I don't know why...).

Any info in how to position / resize images with caspar? Also, how can I add dynamic images to flash templates?

Have a good one!