Chapter 17. Connecting to Twitter
To connect to Twitter in an integration, see the following topics:
You need a Twitter developer account to authorize access from your Fuse Online environment to Twitter. If you do not already have a Twitter developer account, go to https://apps.twitter.com, sign in to Twitter, and click Apply for a developer account. Obtaining the developer account is quick when you provide a professional email address, such as me@redhat.com rather than a personal address such as you@gmail.com.
17.1. Register Fuse Online as a Twitter client application
You must register your Fuse Online environment as a client application that can access Twitter. This lets you create any number of integrations that connect to Twitter. In other words, you need to register a particular Fuse Online environment with Twitter only once.
In each Fuse Online environment, there can be only one registration of Fuse Online as a Twitter client application. However, while each Twitter connection uses the same registration, it can use different user credentials.
Perform these steps:
In Fuse Online:
- In the left panel, click Settings.
-
On the Settings page, near the top, to the right of the callback URL, click
to copy the callback URL for your installation of Fuse Online to the clipboard. You will need this URL later in this procedure.
- To the right of the Twitter entry, click Register to display the Consumer Key and Consumer Secret fields.
In another browser tab, go to your Twitter developer account, sign in if you need to, and do the following:
- In the upper right, next to the name of your developer project, click the down caret and click Apps.
- In the upper right, click Create an app.
- In the App name field, enter a name such as My Fuse Online Client.
- In the Application description field, enter a tip such as For leveraging tweets.
-
In the Website URL field, paste the URL that you copied at the beginning of this procedure and remove
api/v1/credentials/callbackfrom the end of the URL. - Select Enable Sign in with Twitter.
-
In the Callback URLs field, paste the URL again. It should be something like this:
https://app-proj9128.7b63.fuse-ignite.openshiftapps.com/api/v1/credentials/callback. -
A 100-character description of how you plan to use this app is required. For convenience, you can copy and paste:
This is a demo application so that I can evaluate how to integrate Twitter with my enterprise applications. - Click Create.
- Click Create again to confirm that you reviewed the developer terms.
- At the top of the page for the app you just created, click the Keys and tokens tab.
- Copy the API key.
- Return to your Fuse Online Settings page, paste the Twitter consumer API key into the Twitter Consumer Key field.
- On the Twitter Keys and tokens tab, copy the consumer API secret key. and paste it into the Fuse Online Twitter Consumer Secret field.
- Click Save and then click Ok.
17.2. Create a Twitter connection
A connection to Twitter requires registration of Fuse Online as an application that can access Twitter. If you did not already register Fuse Online, see Section 17.1, “Register Fuse Online as a Twitter client application”.
After you create a Twitter connection, you can use it in multiple integrations.
To create a Twitter connection:
- In Fuse Online, in the left panel, click Connections to display any available connections.
- In the upper right, click Create Connection to display the available connectors. A connector is a template that you use to create one or more connections.
- Click the Twitter connector.
- Click Connect Twitter to display a Twitter authorization page. You might need to log in to Twitter before you see the authorization page.
- Click Authorize app to return to Fuse Online.
-
In the Connection Name field, enter your choice of a name that helps you distinguish this connection from any other connections. For example, enter
Twitter Connect 1. -
In the Description field, optionally enter any information that is helpful to know about this connection. For example, enter
Sample Twitter connection that uses my Twitter login credentials. - In the upper right, click Create to see that the connection you created is now available. If you entered the example name, you would see that Twitter Connect 1 appears as a connection that you can choose to add to an integration.
17.3. Add a Twitter connection to an integration
You must create a Twitter connection before you can add a Twitter connection to an integration. If you did not already create a Twitter connection, see Section 17.2, “Create a Twitter connection”.
A connection to Twitter must be the start connection in an integration. You must be creating an integration and being prompted to choose its start connection or you can be updating an integration to change its start connection. If you need to, see the general procedure for creating an integration. or see updating integrations.
To add a Twitter connection to an integration:
- On the page that displays available connections, click the Twitter connection that you want to add to the integration. When the integration uses the selected connection to connect to Twitter, Fuse Online uses the credentials defined in that connection.
Click the action that you want the selected connection to perform. A Twitter connection that you add to an integration performs only the action you choose.
- Mention triggers execution of the integration when a tweet contains your handle.
- Search triggers execution of the integration when a tweet contains text that you specify.
- Optionally, enter the configuration information that Fuse Online prompts for. For example, the Search action prompts you to specify how often to search and keywords to search for.
- Click Done to add the connection to the integration.
The connection appears in the integration flow as the start connection.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.