Hi, has anybody encountered this problem when you retrieve tweet you don't get the latest.
The tweet received could be the 3rd last message on the twitter server.
It just received the 2nd last message after some time but until now still not receiving the last message.
I have checked using the web browser and the last message is already on the twitter server.
To add on, I am trying to look for a key word in the latest tweet before I carry out some actions. How can I do that?
Currently I have the following codes to look for tweet that begins with "stat:"
If the tweet contains this keyword it will retrieve the tweet following the word "stat:". However if the latest tweet does not have the keyword, it will continue and end up retrieving the older tweet with the keyword "stat:"
For example, I tweet "stat: Testing". It will retrieve and print "Testing"
then I tweet "Next Test" without keyword "stat:"
it will still retrieve and print "Testing" because that is the tweet with the keyword.
I only wants it to check the latest tweet, if with keyword - retrieve and print text following "stat:" and if without keyword - print no message
boolean retrieveTweet()
{
if (client.connected()) // Whether or not the client is connected.
{
if(finder.getString("stat:","",tweet,50)!=0 ) // Finds text "temp=" in weather Yahoo XML page source
{
Serial.print("Message: ");
Serial.println(tweet);
textArea.ClearArea();
Hi, I am still not receiving the latest tweet. Please help me
I have attached a photo of my tweet messages.
What happened is:
When my latest tweet is "No sweat", the code will not retrieve any message --- that's correct as per the code.
But when my latest tweet is "stat: Testing onboard", the code will retrieve the message but not the latest. It will retrieve "Working again".
I have attached my codes as follows:
boolean retrieveTweet()
{
if (client.connected()) // Whether or not the client is connected.
{
if(finder.getString("","",tweet,50)!=0 ) // Finds text "temp=" in weather Yahoo XML page source
{
test = 0;
for(i = 0; i<5; i++)
{
if(tweet == stat*) //check if the first 5 char = "stat:"* * {* * test += 1;* * Serial.print("Test: ");* * Serial.println(test);* _ Serial.println(tweet*); Serial.println(stat); } } } if (test > 4) //it is a user status* * { if(finder.getString("stat:","",tweet,50)!=0 ) { Serial.print("Message: "); Serial.println(tweet); textArea.ClearArea();*_