This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
nolongerexistant's profile picture

So about the Twitter Library

Started by nolongerexistant, 24 November 2012 - 11:09 AM
nolongerexistant #1
Posted 24 November 2012 - 12:09 PM
So basicly what i'm trying to do is to create an Twitter Program that allows you to read and send tweets,
as well as see some additional information about the tweet on the screen (tweeter, time tweeted, retweets, favorites).

But here's the thing.. I have no idea how the Twitter Library works, or how I'll be able to implement it in Lua.
I think the best thing to do is just to try making a API supporting as much of the functions as possible and then to use that in the porgram.

Does anyone have any suggestions on how I could do this the easy way?
remiX #2
Posted 24 November 2012 - 03:31 PM
Easy way? I don't think there is an easy way for this. It seems quite hard ;)/>/>
zekesonxx #3
Posted 26 November 2012 - 01:43 PM
There is no easy way to do it.

You can get the tweets from Twitter via JSON, but you are unable to authenticate due to OAuth and REST.

The easiest way to do it would be to make a website that pretty much serves as a proxy from CC computers to Twitter.

TL;DR: Very hard, lots of effort and coding. Just showing tweets would be easy though.
nolongerexistant #4
Posted 27 November 2012 - 02:09 AM
There is no easy way to do it. You can get the tweets from Twitter via JSON, but you are unable to authenticate due to OAuth and REST. The easiest way to do it would be to make a website that pretty much serves as a proxy from CC computers to Twitter. TL;DR: Very hard, lots of effort and coding. Just showing tweets would be easy though.

Thought so, is it possible to autherancate and tweet using php?
zekesonxx #5
Posted 27 November 2012 - 06:36 AM
Yes.

For whatever stupid reason I decided to compile a few links for you.
- OAuth-PHP PHP library for OAuth authentication and requests
- Twitter REST API Docs for the Twitter API.
- JSON4Lua GitHub hosted JSON encoder/decoder. Just call json.encode() or json.decode().