Twitter Listener

The Twitter Listen Adaptor allows a graph to listen for user stream messages for the authenticated user. These include Tweets that contain keywords, hashtags or usernames and events that include friends lists, direct messages and many other event types. 


Creating a Twitter Listen Adaptor 

In order to create a Twitter Listen Adaptor it is best practice, but not necessary, to create a Twitter Connection.

To create the Twitter Listen Adaptor on any graph click on the Add Listener to Graph button  in the top right of the graph window. This will bring up the Listener configuration window. 



  • Choose the Twitter Listener Type from the Listener Type drop down 
  • Choose the Adaptor Connection from the Adaptor Connection drop down 
  • Choose the  Twitter Listen Mode from Keywords or User Stream from the Twitter Listen Mode drop down 


Twitter Keywords Listen Mode 

In this mode the Listener will connect to the Twitter streaming API and find any tweet texts, hashtags or mentions of usernames that match the specified tracking phrases.

The tracking phrase is a comma-separated list of phrases which will be used to determine what Tweets will be delivered on the stream. A phrase may be one or more terms separated by spaces, and a phrase will match if all of the terms in the phrase are present in the Tweet, regardless of order and ignoring case. By this model, you can think of commas as logical ORs, while spaces are equivalent to logical ANDs (e.g. ‘the twitter’ is the AND twitter, and ‘the,twitter’ is the OR twitter).

The returned values will be a Twitter tweet object

User Event Stream Mode

In this mode the Listener will connect to the User Stream for the authorized user and return the user stream messages as defined in the Twitter API. You can choose one or more of the outputs to receive: 

  • Events - Notifications about non-Tweet events - this includes Like and Unlike events 
  • Friends - Upon establishing a User Stream connection, Twitter will send a preamble before starting regular message delivery. This preamble contains a list of the user’s friends. This is represented as an array of user ids
  • Direct Messages - returns direct message objects as defined in the Twitter API
  • Tweet - Any Tweets from the user

Note:

  • Utilizing the user stream functionality enables you to essentially ‘listen’ to multiple user accounts.
  • If you create a Twitter account and use that account to follow specific users then every time there is a new post that would appear on that users timeline, your listener will pick up the details.

Validation Warnings


Trying to save the Database Listen Adaptor without completing all of the necessary parts will create one or more notifications. 


Notification

Notification
Note

Twitter Listener must have a Connection setNo connection has been selected

Twitter Listener must have an output destination setThe twitter listener needs a location to write the incoming records to for all of the output types

Twitter Keyword Listener must have a keywords tracking phraseIn order to track phrases the keywords tracking phrase must not be empty


Privacy Policy
© 2022 CSG International, Inc.