Can't get Twitter widget tweeting!

Greetings all!
I have been trying to get the Twitter widget working without any success. I am working with an ESP8266-01 module.

I’ve used the example, and I’ve even stripped it down to just a timed tweet, but still nothing. My Blynk app shows I am connected to Twitter, and I see Blynk registered as an app in Twitter.

Currently, I am able to control a LED on pin 0, and receive an email every 2 minutes, but the tweets never appear to send. I’ve seen a couple of other posts about this, but I haven’t been able to find any solutions.

Any help is appreciated.

Here’s the code I have loaded right now:
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>

char auth[] = "<my_auth_here>";

char ssid[] = "<my_ssid_here>";
char pass[] = "<my_pass_here>";

SimpleTimer timer;

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);

  // Setup a function to be called every 2 minutes
  timer.setInterval(2L * 60000L, tweetUptime);
}

void loop()
{
  Blynk.run();
  timer.run();
}

void tweetUptime()
{
  long uptime = millis() / 60000L;
  Serial.println("Tweeting every 2 minutes ;)");
  // Actually send the message.
  // Note:
  //   We allow 1 tweet per 15 seconds for now.
  //   Twitter doesn't allow identical subsequent messages.
  Blynk.tweet(String("Running for ") + uptime + " minutes.");
  delay(5000);
  Blynk.email("<my_email_here>", "BlynkTest", String("Running for ") + uptime + " minutes."); 
  Serial.print("Uptime: ");
  Serial.println(uptime);
}

How are you even remaining connected with a 5 second delay after each tweet? Remove that delay completely… I see no purpose in it at all.

Even without the delay, it still does not tweet. The delay was an attempt to see if slowing the requests would solve the issue. I have no problems with disconnects from Blynk servers, at least not that are reported in the Serial monitor. And again, the emails are always being sent, no tweets ever appear in Twitter.

Thanks!

Well as it appears you have only been in the forum for under an hour… firstly, Welcome :smiley:

Secondly… first rule of Blynk - no delays!! Second rule of Blynk - if you are using an ESP based device - NO delays!! Third rule of Blynk - search everything (oh, and no delays - use SimpleTimer when necessary) :wink:

I am guessing you have your Twitter Widget loaded and account properly set up and tested outside of Blynk?

1 Like

Thanks. I’ve found myself here trying to help a friend who is having this same issue.

I will pull the delay out, and see if there is any change. I have tried searching, but again anything I’ve found seems to be a dead end, with no resolution or indication of success.

As far as I can tell, the Twitter widget is loaded and correctly set up:
App Screenshot

I’m not sure what you mean by “tested outside of Blynk”. Could you elaborate?

Well, I mean using Twitter in whatever way you normally tweet - As in, not a brand new untested account made only for Blynk usage.

1 Like

It is a new account, created for testing with Blynk. I did send one tweet a couple of days ago via the Twitter webpage, to see if that might be an issue.

Well I dusted off my twitter account to test… and no results here either; However, as I am on Local server, it appears I may have more setup to do to get Twittering via Blynk… so sorry, no quick answers from me right now.

1 Like

Guys, there is a known issue with the Twitter widget configured on iOS: https://github.com/blynkkk/blynk-library/issues/284
But should be working fine on Android.

1 Like

@deablynk

OK, based on the sorta formatted code you posted, I am guessing you are on the cloud server and NOT a Local Server, is that correct?

If you are using the Cloud, then I have no idea what could be wrong; If though you are using a Local Server, then it seems Twitter is not an option for Local Server users yet (even after getting the keys etc. all placed in the twitter4j.properties file) Something about needing changes to the app widget as well?

@Dmitriy can you confirm this, or has something changed since last years post about this.

1 Like

@Gunner this is not local server, but yes, all the same. @Eugene described cause.

1 Like

Thanks for letting me know… good thing I don’t tweet, nothing to miss :wink:

1 Like

Thanks all! I had looked at GitHub issues, but apparently not for the right project! I fired up an Android tablet and now the widget is tweeting! I’ll keep an eye out for the app update.

Thanks again!