Twitter Singleton

This is a layer that will handle communication with Twitter and secures the connection outside the Application.
If the user has not yet done the authentication process this will start and handle the process automatically.



Twitter.api('statuses/user_timeline', { count: 30 }, function(result) {
   //Received a response from Twitter API.
   console.log('The result:', result);


api(path, method, params, callback)

This method will make calls to the Twitter API's. Look at the twitter API for what is possible.


Name Type Argument Description
path String

The API call path as defined by Twitter.

method String optional 

The HTTP method that you want to use for the API request. Default is get

params Object

The parameter object to include in the API call.

callback function

The method that will be triggered when the API call returns a result.


This will reset the Twitter API. Subscribed function will also be removed.



The active profile has a twitter authentication and the user has connected by entering a password.


The active profile lost the connection with twitter.


The active profile has no twitter authentication done.