In this video we'll configure our site to automatically post to Twitter when we create a new article, and then we'll take a look at how we can display one or more Twitter streams on our site.

Add an Authenticated Account

  • Click "Twitter" tab
  • Add Twitter Accounts
    • Click the link "Go to Twitter to add an authenticated account"
    • Click "Authorize App" (If you are not already logged in to Twitter, you will need to login first.)

I'll add my twitter account.

  • @ModsUnraveled
    • [x] Tweets (This will show tweets posted by this account.)
    • [x] Mentions (This will show tweets by other users that mention this account.)
    • [ ] Delete (This option removes the account from the list of authenticated accounts.)
  • (Save changes)

Post to Twitter when a new article is posted on the site

  • Click "Post" tab
  • Node types
    • [x] Article
  • Default format string: "Check out my new post: !title at !tinyurl"
  • [x] Post to Twitter by default (This just sets the default status of the "Announce this post on Twitter" option when creating new content. The content author will have to option to override this setting when creating a new article.)
  • (Save configuration)

Create New Article

  • Click "Add content" (node/add/article)
    • Title: Article #1
    • Body: (Lorem Ipsum)

If we scroll down, we'll see a new vertical tab "Post to". In this tab, we can choose whether or not to post this article to Twitter. Since we said to post by default, it is already checked.

  • (Save)

Now, we can switch back to our Twitter account where we'll see the link to our new post!

Pull tweets from your Twitter Account

Now, let's compose a new tweet that will be displayed on our site.

  • Compose new Tweet: Sample Tweet
  • (Tweet)

Tweets are pulled in to the site on every Cron run, so let's go ahead and run Cron now to pickup our new tweet.

Run Cron

  • Go to "Configuration => System => Cron"(admin/config/system/cron)
  • (Run cron)

Now, we can go to "/tweets" on our site to see our tweets!

This page is a view created by the Twitter module, and in Video 10, we'll take a look at that view, but first, let's make sure we understand the permissions that come with the Twitter module.