Twitter Integration

Sirportly ships with built-in Twitter integration allowing you to automatically send & receive messages through Twitter. In order to enable this functionality within your application, you need to set up your own "Application" within the Twitter developer site. These instructions outline the process for creating your application and configuring Sirportly.

To begin, you will need a Twitter account. If you don't already have one, you can sign up for one through the twitter site.

Creating the application

Image

Firstly, navigate to the Twitter Developer Site and select 'Login' from the top right and enter your credentials to login. Once you have logged in, go back to the top right, move over your username and select the My Applications option.

This will open up a list of all the applications which you have configured. Select the Create a new application button and complete the form which appears with the appropriate information. We've provided some recommendations below, but most of these options can be anything and don't really matter.

  • Name: [your company name]'s Sirportly
  • Description: The Sirportly installation for [your company name]
  • Website: your website URL
  • Callback URL: https://yoursupportsite.company.com/oauth/twitter

Once entered, accept the terms & conditions and create your application. Once the application has been created, you need to go and change a few settings. Select the Settings tab from the page which appears and scroll down to Application Type. You should ensure that the permissions option is set as Read and Write and press the button at the end of the form to submit.

Configuring Sirportly

Twitter will provide you with two strings which must be configured in your configuration file. These tokens are called the Consumer Key and the Consumer Secret and can be found on the 'Details' tab in the Twitter developer site.

Enter the following configuration into your configuration file at config/sirportly.rb and restart your server to apply the changes. The twitter_polling_interval is optional and defaults to 5 minutes. When setting this interval, you should bare in mind that Twitter has rate limits which may affect your service if you poll too frequently.

config.twitter_oauth = {:key => 'yourconsumerkey', :secret => 'yourconsumersecret'}
config.twitter_polling_interval = 5.minutes