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);
}
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.
Well as it appears you have only been in the forum for under an hour… firstly, Welcome
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)
I am guessing you have your Twitter Widget loaded and account properly set up and tested outside of Blynk?
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?
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.
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?
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.