Twitter

Introduction

The Connector for Twitter provides easy access to Twitter Data. The Connector abstracts the underlying data source into tables, views, and stored procedures that is used to retrieve and update data.

Connection String

You can connect using your User and Password or OAuth. OAuth requires the authenticating user to interact with Twitter using the browser. To authenticate using OAuth, you can use the OAuthClientId and OAuthClientSecret embedded in the provider or you can register an app to obtain your own. If you intend to communicate with Twitter only as the currently authenticated user, then you can obtain the OAuthAccessToken and OAuthAccessTokenSecret directly by registering an app.

Connection String Parameters

Parameter Description
OAuth Client Id The client Id assigned when you register your application with an OAuth authorization server.
OAuth Client Secret The client secret assigned when you register your application with an OAuth authorization server.
OAuth Access Token The access token for connecting using OAuth.
OAuth Access Token Secret The OAuth access token secret for connecting using OAuth.

Connecting to Twitter

Twitter API uses the OAuth authentication standard. You can obtain your OAuth credentials by registering an app.

  1. Log in to https://dev.twitter.com/apps.

  2. Click Create New App.

  3. Enter the name, description, website to be displayed to users when they connect then submit the form.

  4. Navigate to the keys and access tokens tab.

  5. Obtain the application’s ‘consumer key’ and ‘consumer secret’. The Consumer Key and Consumer Secret is the OAuthClientID and OAuthClientSecret to be used in the Connection String.

  6. Scroll down to the bottom of the page and click “Create my access token”.

    If you intend to communicate with Twitter only as the currently authenticated user, then you can copy the generated ‘Access token’ and ‘access token secret’ from the resulting page.

    These will correspond to the ‘OAuth Access Token’ and ‘OAuth Access Token Secret’ options on your connection string.

Data Migrations

To Check for the data migrations:

  1. Add a new connection in Loome Integrate as shown.

    • Go to tasks and click on Connections.

    • Add a new connection Using Add New Connection Option.

    • Choose Twitter Connector from the available Connector Options.

  2. Using the connection string parameters, Verify the connection using the VERIFY CONNECTION Option in Loome Integrate. Once the Connection is verified, Insert the Connection Using Insert Option.

  3. Create a Job Using ADD A JOB option in Loome Integrate, add a data migration task to the job.

  4. Create a New Task by right clicking job list and then Add a New Task Option. If you want to edit an Existing Task Use Edit Task.

  5. Choose a Data Migration Task.

  6. Choose the source and the destination for the migration of data. Name the Task.

  7. Choose the Tables or the data that need to be migrated from the source to the destination. You can Copy all Tables by checking Copy all tables box.

  8. Execute the Job. Check for results and the details of the data migrated in Execution History.

Data Model

The Connector for Twitter models Twitter entities in relational Tables, Views, and Stored Procedures.

Tables

The provider exposes tables for data sources that support both retrieving and updating data. The tables are normalized and contain an Id column, which is the primary key. This behavior is consistent across all tables in the product.

Name Description
DirectMessagesReceived Query and delete direct messages received by the authenticated user.
DirectMessagesSent Send direct messages and query messages sent by the authenticated user.
Favorites Create, delete, and query a list of favorite tweets of the authenticated user and allow the user to favorite new tweets or remove existing favorites.
Following Create, delete, and query a list of users that the current Twitter account is following, otherwise known as friends.
Tweets Create, delete, and query status updates and tweets from the authenticated user.

Views

Views are tables that can be Modified. Often, a stored procedure is available to update the data if such functionality is applicable to the data source.

Name Description
AccountSettings Query account settings about the currently authenticated user.
AdAccounts Retrieve all of the advertising-enabled accounts the authenticating user has access to.
AdAvailableAudiences Query available audiences for this account.
AdCampaigns Retrieve details for some or all campaigns associated with the current account.
AdFundingInstruments Retrieve some or all funding instruments associated with the account specified in the path.
AdInsights Provide qualitative information about various Twitter audiences.
AdLineItems Retrieve some or all funding instruments associated with the account specified.
AdPromotedTweets Retrieve all of the advertising-enabled Tweets the authenticating user has access to.
AdStats Query information about all available metrics for a certain entity.
Followers Query a list of users following the current Twitter account.
ListMembers Query the members of a specified list.
Lists Query Twitter list information based on a set of criteria.
ListSubscribers Query the subscribers to a specified list.
Mentions Query the most recent mentions (tweet containing @username) for the authenticating user.
Retweets Query a list of retweets of the authenticated user.
Trends Query the daily trending topics from Twitter.
Users Query a list of users based on the SearchTerms, Id, or Screen_Name.