Pages: 1 2 [3] 4   Go Down
Author Topic: Made my own TwitterClient and I think it's better than the example one  (Read 12703 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

good day,

I realised once i run the code, when i update twitter while the code is running, it will not get updated to the latest tweet.

edit: got a fix to it! do you want me to share the code i have when i'm done? also fixed the part with the tweets broken into 16chars per line in a string like what you suggested.
« Last Edit: September 10, 2012, 02:40:42 am by kenneth87 » Logged

Hamme, Belgium
Offline Offline
Sr. Member
****
Karma: 4
Posts: 386
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I did see your previous post, but I didn't had the time to answer yet. Very nice you solved this yourself.

I would love to see your code, but you should get some credit yourself. Make a new post, showing off your own project (try to include a youtube movie or some pictures), just make a quick reference to this post, explaining you started using this code and adapted it, for you own project.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good day JO3RI,

I am able to post the code soon as it is due for submission by start november. also my twitter client stopped working due to the recent API updates. do you have any idea what changes i have to make to enable it to start working again?

Twitter api version changed from v1.0 to v1.1
Logged

Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

bump
Logged

Accelerate to 88 miles per hour.

Hamme, Belgium
Offline Offline
Sr. Member
****
Karma: 4
Posts: 386
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When I past this in my browser:

http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=JO3RI&count=1%20HTTP/1.1

replace JO3RI with your own twitter name if you like.

and if I try the same thing with hashtag search,

http://search.twitter.com/search.atom?q=%23arduino

I still get to see the last tweets, so mine is still working
« Last Edit: October 18, 2012, 10:11:06 am by JO3RI » Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yup mine is working too but when you use a code on Arduino IDE that uses GET HTTP, it doesn't seem to get tweets off twitter with that exact same line. any ideas?

also is there a way to implement oauth without going thru a PHP server?
Logged

Hamme, Belgium
Offline Offline
Sr. Member
****
Karma: 4
Posts: 386
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I would give Arduino IDE 1.0 a try, the newer version seems to have other issues with my code (like dns)
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i'm on arduino IDE 1.0! tested your code a while back. i could receive a weather update via xml but can't receive tweet updates via the same thing.
Logged

Hamme, Belgium
Offline Offline
Sr. Member
****
Karma: 4
Posts: 386
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

And you didn't change a thing? That's strange indeed. I could test your code on my own Arduino and network if you'd like.

Just attach your code to a reply and I'll give it a try. If it works on my end, you might have network issues. OR you might have set the interval to low so your Arduino is asking for updates way to fast and your IP got banned.
Logged


Murcia, Spain
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi JO3RI,
I'm trying to do a Twitter client with Arduino (I want to receive tweets from an user account and display it on the serial monitor. I'm using an Arduino UNO R3 board and the Ethernet shield.
I have tested this example http://arduino.cc/en/Tutorial/TwitterClient and it works, but I have a problem: I'm Spanish, so there are some characters we use like letter 'ñ' and others like '¿' or '¡', etc., and the serial monitor doesn't show it. It shows "&#241" instead of 'ñ', "&#191" instead of '¿', "&#161" instead of '¡', etc. smiley-sad
Could you please help me to fix it? Do you have any idea of how I can solve it? Could your code help me to do it?
You'd be very helpful, really smiley
« Last Edit: January 28, 2013, 09:51:51 pm by G3RMiCH » Logged

Hamme, Belgium
Offline Offline
Sr. Member
****
Karma: 4
Posts: 386
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Could you please help me to fix it? Do you have any idea of how I can solve it? Could your code help me to do it?
You'd be very helpful, really

are you able to show those characters on the serial monitor, when put into a string? (not from twitter, but when you just do Serial.print("those special characters"); ?

You can replace those &#241 , &#191, &#161 with the actual character. I did that in another project of mine (www.jo3ri.be/arduino/projects/castduino). You can start looking for &# with Textfinder and when found replace those with along with the according number.

Something like if &# and 241 than you have ñ.

also check google on "string replace" (http://www.cplusplus.com/reference/string/string/replace/)
 
Logged


Sweden
Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
Arduino System Go!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice work and thanks for sharing!

I have been playing with a similar idea for control purposes, but never actually built any of it.

A trick I find could help a lot to simplify the on-board Arduino logic would be to put a service in-between the Arduino and the Twitter API to act as a proxy and format translator.

The idea would be that you can use the right tool for the right job. Calling a REST webservice, parsing the results and doing something with the data is a piece of cake in most "internet languages", like Java, JavaScript, Ruby or PHP. With a such a proxy in place, you could re-format the response from Twitter into something very Arduino-friendly to save valuable CPU and RAM. It would also give you a separation of concerns and provide a place to add more advanced features like caching of results and adding in more sources without having to change the Arduino program.

Hosting of the translator proxy could be done on a server of yours, or on an application hosting service like the examples below.
http://www.heroku.com/
or http://nodejitsu.com/

Anders
Logged

Hamme, Belgium
Offline Offline
Sr. Member
****
Karma: 4
Posts: 386
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Nice work and thanks for sharing!

Thanks ;-)

Quote
The idea would be that you can use the right tool for the right job.

Good point, but sometimes it's just fun to have all in one solutions.
Logged


Sweden
Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
Arduino System Go!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



Code:
Good point, but sometimes it's just fun to have all in one solutions.

That is true and fun is one of the most important factors to consider. Why else would one have an Arduino hobby?

Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 211
Posts: 13471
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Why else would one have an Arduino hobby?
If you really want to know ask this in the bar sport section smiley-wink
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: 1 2 [3] 4   Go Up
Jump to: