Get Twitter Account Connected Into Microsoft Azure Blob Storage Live

In this article we’ll learn how to connect our Twitter account with Microsoft Azure Blob storage account and get the live tweets to Azure step by step.

Here are the steps:

Step1: Go to Microsoft account login page and type your login details.

Step2:
Click “Sign in” button.

SignIn

For working on the Azure Portal, go to the “HOME” button on the top of the window and click on it.

Home

Click on “Portal”.

Portal

First, I need to create a “Storage Account” and “Blob Container.”

So, go to “Browse” and scroll down, and select “Storage accounts (classic).

classic

You will see the following figure, click on “Add” button to create a “Storage Account”.

storage

In the name section give whatever name you want, I gave it “storagenitintwitter.” I need to create a new “Resource Group” also. Resource Group is a place where I managed all the related account of particular storage account.

I gave “IMNitin” name to my resource group.

Select the location of your storage. My location of the storage is “East Asia”, so I selected East Asia. Click on “Create” button.

classic

Now, I need to create a “Blob Container” for the account, so just click on Storage Account and then “Blobs” to create a blob.

blob

Now in the next window, click on “Container”.

container

Give the name to your Container, here I have given it “nitincontainer.” Access type will be “Private” for your access only.

Click on “Create” button.

create

Now, I need to create an “Azure Blob Storage Connector.” Click on “Browse” and in the search panel type “Marketplace.

Click on “Marketplace.

marketplace

In the search box type “Azure Storage Blob Connector.

Click on “Azure Storage Blob Connector.”

connector

Click on “Create” button.

create

After clicking on “Create” button, give the name for Blob Connector, here I have given it “Azure Storage Blob Connector.”

Then click on “Package Settings," it will ask for Blob Container Uri, so just go to your container and copy the path of Blob Container.

connector

Click on “Browse” and go to your storage account.

Click on “Blobs.

blob

After clicking on “Blobs,” you will find your container, here my container is “nitincontainer.” Whenever I click on it, it will redirect to container properties.

Click on “Properties.

properties

Copy the “URL” from container properties.

url

Paste the copy “URL” over here in the package settings.

Click on to “OK” button.

button

In the App service plan, give the service plan name, I have given “nitinlogicplan.
Select the “resource group” which is “IMNitin.”

And click on “Create” button.

create

Now, I need to create our “Twitter Connector,” for it go to “Browse” and type “Marketplace.”
Click “Marketplace”.

marketplace

In search box, type “Twitter Connector."

You will find “Twitter Connector." Click on it as in the following:

connector

Click on “Create” button.

create

Here in the below figure, give the name for Connector, here I have given it “TwitterConnector."

Next is “Package Settings," after clicking on it you will be redirected to package settings window. This window will ask for “Consumer key” and “Consumer Secret."

setting

For the “Consumer key” and “Consumer secret," go to the following link.

Note: Make sure for this process you should log in to your twitter account.

Click on “Create New App."

new

After clicking on button, you will see the below page, here I need to create an application, where we can find our “Consumer key” and “Consumer Secret."

In the name section, I have given “StorageNitinTwitter." 

In the description section, you can give any script; I have given “app for azure."

In the “Website” section, give the temporary “URL” over here, your applications publicly accessible home page, where users can go to download, make use of, or find out more information about your application. This fully-qualified URL is used in the source attribution for tweets created by your application and will be shown in user-facing authorization screens.

(If you don't have a URL yet, just put a placeholder here but remember to change it later.)

create

Check on “Yes," and then click “Create your Twitter application."

application

I have successfully created an application of twitter, click on “Keys and Access Tokens” on the top of the page, and copy the “Consumer Key” and “Consumer Secret” from here.

storage

Paste both the keys over here in the “Package Settings."

Click on “OK” button.

key

Select the app logic plan which is “nitinlogicplan,” and select the resource group which is “IMNitin."

Click on “Create” button.

nitinlogicplan

So, I have successfully created my “Twitter Connector,” so now I need to copy the “URI” of the Twitter Connector and provide in the Twitter Application, in “Website” and “Callback URL” section.

Go to the “Resource groups” and select the “IMNitin” resource.

redsource

Here are all my apps in one resource, “IMNitin” named resource.

For the “URL”, click on to “Twitter Connector."

connector

Click on to “Authentication."

Authentication

Copy the “Redirect URI” from here.

URL

Paste the “URI” in “WebSite” and “Callback URL” in the twitter application page.

page

Click on “Update Settings” button to save the details.

icon

Now, I need to create logic app, so go to “New," and select “Web+Mobile," and select “Logic App."

new

Give the name to your logic app, here I have given “NitinLogicApp” and select app service plan which is “nitinlogicplan," select resource group which is “IMNitin."

Click “Create” button.

create

For creating Triggers and actions, go to the “resources groups," click on resource group, which is “IMNitin," and select “NitinLogicApp," which is just created.

imnitin

Click on “Triggers and actions."

triggers

Select the “Create from Scratch” panel.

create

Now, you will see following figure. I need to create recurrence where I get the schedule of the recurrence.

Click on “Recurrence," right side of the window in resource group.

Choose the frequency and interval of the recurrence schedule, and click on the green check button.

check

Now, we need to create twitter connector, where I fetch my twitter applciation.

So just select the “Twitter Connector."

connector

Click on “Authorize” button.

Authorize

After clicking on the “Authorize” button, you will be redirected on twitter page for authorization.

Click on “Authorize app."

authorize

Now I’m successfully fetching with twitter.

Click on “Search Tweets” button, for the timeline of twitter account.

search tweet

Give the query name to retrieve tweets from twitter. I have given the name “#microsoftazure” to it.

Click on the green check.

check

Now I need to fetch with “Azure Storage Blob Connector." Select the “Azure Storage Blob Connector."

After this, you will see the azure connector window (Number 2).

Click on to “Upload Blob."

blob

In the “Blob Path” section, type the path “/tweet.txt” and just click on rectangle button, and select “Tweeted By” option from the dropdown.

twitter

Now click on “Content” option and click on rectangle button, and select “Tweet Text” option from the dropdown.

check

Click on the green check.

check

Click on to “Save” button, to save the current actions.

save

Click on “Run Now” button to run the triggers and actions.

run now

We  succeded AND got my live twitter data in the Azure Blob.

Click on to “twitterconnector," after clicking you will find the “Inputs Link” and “Outputs Link."

Click on “INPUTS LINK."

input link

So, we can see the query, operations, authentication, and result.

result

Now click on “Outputs Link."

I have successfully fetched with Twitter data.

code

I hope you enjoyed this article. Stay tuned for upcoming articles and try this.

Thanks for reading

Connect (“Nitin Pandit”);
 
Read more articles on Azure: