{"id":1307,"date":"2014-10-09T13:57:40","date_gmt":"2014-10-09T17:57:40","guid":{"rendered":"https:\/\/blogs.mathworks.com\/iot\/?p=1307"},"modified":"2016-02-07T14:53:50","modified_gmt":"2016-02-07T19:53:50","slug":"official-tutorial-sending-tweets-automatically-every-morning-with-timecontrol","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/iot\/2014\/10\/09\/official-tutorial-sending-tweets-automatically-every-morning-with-timecontrol\/","title":{"rendered":"Sending Tweets Automatically Every Morning With TimeControl"},"content":{"rendered":"<p>TimeControl can be used to send Tweets automatically at predetermined times. \u00a0In this tutorial, we&#8217;ll be sending a Tweet every weekday with the current time and the current <a href=\"http:\/\/www.cheerlights.com\/\">CheerLights<\/a> color.<\/p>\n<p>The first step is to <a href=\"https:\/\/thingspeak.com\/apps\/thingtweets\">link a Twitter account<\/a> to ThingSpeak.<\/p>\n<p>Next, we&#8217;ll <a href=\"https:\/\/thingspeak.com\/apps\/timecontrols\/new\">create a new TimeControl<\/a> with the following values:<\/p>\n<ul>\n<li>Name: &#8220;CheerLights to Twitter&#8221;<\/li>\n<li>Frequency: &#8220;Recurring&#8221;<\/li>\n<li>Days: &#8220;Mon&#8221;, &#8220;Tue&#8221;, &#8220;Wed&#8221;, &#8220;Thu&#8221;, &#8220;Fri&#8221;<\/li>\n<li>Time: &#8220;9:40 am&#8221;<\/li>\n<li>Fuzzy Time: &#8220;+\/- 10 minutes&#8221;<\/li>\n<li>Action: &#8220;ThingTweet&#8221;<\/li>\n<li>Tweet: &#8220;It is currently %%datetime%% and CheerLights is %%channel_1417_field_1%%.&#8221;<\/li>\n<li>Twitter Account: (select your linked Twitter account)<\/li>\n<\/ul>\n<p>Save this TimeControl and you&#8217;re finished. \u00a0Every weekday within 10 minutes of 9:40 am in your timezone, TimeControl will send a Tweet with the current datetime and the current CheerLights color.<\/p>\n<p>The CheerLights <a href=\"http:\/\/api.thingspeak.com\/channels\/1417\/feed.json\">Channel ID is 1417<\/a>, and colors are saved in field 1, so %%channel_1417_field_1%% will be replaced with the current CheerLights color. \u00a0You can change these values to access the most recent data from your own Channels.<\/p>\n<p>Here&#8217;s an <a href=\"https:\/\/twitter.com\/thingspeaktest\/status\/520207031836614658\">example Tweet<\/a>\u00a0from this tutorial.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TimeControl can be used to send Tweets automatically at predetermined times. \u00a0In this tutorial, we&#8217;ll be sending a Tweet every weekday with the current time and the current CheerLights&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/iot\/2014\/10\/09\/official-tutorial-sending-tweets-automatically-every-morning-with-timecontrol\/\">read more >><\/a><\/p>\n","protected":false},"author":148,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[60,42,188,16,31],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/posts\/1307"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/users\/148"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/comments?post=1307"}],"version-history":[{"count":11,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/posts\/1307\/revisions"}],"predecessor-version":[{"id":1690,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/posts\/1307\/revisions\/1690"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/media?parent=1307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/categories?post=1307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/tags?post=1307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}