

Setting our program to output tweet in under 140 characters is simple enough, but do URLs count? If you have used Twitter before, then you probably know that a single tweet can only contain 140 characters. “Link” is not absolutely necessary, meaning that the URL can either be:Ĭhanging this setting would involve altering the code, so we are going to skip ahead and assume that the URL is going to be set under “link.” About Twitter’s character limit According to RSS 2.0 specifications, either “title” or “description” must be set for the item to work. Here, we can see that “description” may sometimes contain tags. The time is listed in RFC822 format, but if you like, you can change it to something else to suit your preference.įigure 5 is like Figure 4, but displays the RSS feed from the official Raspberry Pi blog.

We might be able to use it as a measure for our tweet timing (but let’s leave that for next time!). Below is a sample program to output the four fields of “title”, “link”, “description”, and “pubDate2.”įigure 4 shows data read from DevicePlus’ RSS feedĪlong with the title and URL, we can add a “description” with a character limit to create a more detailed tweet. Reading RSS feeds through PHPĪn RSS feed comes in the XML file format, meaning that it can be read through a single PHP function. The same tags are used here, so be careful not to confuse them. Each article’s information can be seen in the “item” tag within it. “Title”, “link”, and “description” seen under the “channel” tag are the only mandatory tags. The end of the third line reads “version=“2.0””, meaning that this RSS feed uses RSS 2.0. The version of RSS used in a feed can be confirmed in the first tag. Some browsers will display it differently from others, so you may have to look directly at the page source. Over here! (Referring to the layout on July 2015)Īn RSS feed is XSS-based, so you can view it from within a browser. Speaking of which, DevicePlus’ RSS feed can be found on the right sidebar. Each uses a different format, so be careful when writing your program.The differences between each can be read about on the Wikipedia pages linked below. RSS (Rich Site Summary originally RDF Site Summary often called Really Simple Syndication) uses a family of standard web feed formats to publish frequently updated information: blog entries, news headlines, audio, video.Ĭurrently, both RSS 1.0 and RSS 2.0 are used.

#Twitter rss bot update#
You probably already know that it is some kind of URL (?) that provides update information, so here is a quick explanation! When we think of RSS, the first thing that comes to mind is this icon! So, we will be posting updates from an RSS feed. Next, we will need the actual content for the tweets! Ideally, we should tweet info as up to date as possible.
#Twitter rss bot how to#
In the part 1, we figured out how to post tweets through the Twitter API. Let’s continue working on our Raspberry Pi Twitter bot!
