How to use the Twitter API in your business

All the large social networks generate business thanks to the REST system, and Twitter, was not going to be left behind. Twitter’s API contains a set of APIs that can be combined to create an application for your business so you can benefit from the data offered.
3 min reading
06 November 2018
How to use the Twitter API in your business
How to use the Twitter API in your business

BBVA API Market

All the large social networks generate business thanks to the REST system, and Twitter, was not going to be left behind. Twitter’s API contains a set of APIs that can be combined to create an application for your business so you can benefit from the data offered.

All the large, well-known social networks and hundreds of international companies generate business thanks to the REST system (Representational State System), and Twitter, Instagram, YouTube and Facebook, were not going to be left behind.

When we speak of a REST system, we are referring to any interface between systems that use HTTP to obtain data and generate operations on those data in all possible formats, such as XML and JSON.

Without REST APIs, horizontal growth would be much more complicated. As for Twitter, its REST API allows you to read and write Twitter data; in other words, it can be used to create new tweets, read user profiles and the data of followers (among other data from each profile), since it identifies the various Twitter applications and the users who register using OAuth authentication and authorization. The replies from the Twitter REST API are in JSON format.

In addition to the REST API, the public Twitter API has an API for streaming that provides access to a high volume of tweets with low latency. Most developers mix and combine both APIs to generate their own application.

Basic features of the Twitter API

●      The Twitter API has four main “objects”: Tweets, Users, Entities and Places.

●      It has daily restrictions for calls and changes in the API to protect Twitter from abuses. Specifically, the restriction is set up by the user, or better said, by a user access token. The frequency restrictions are divided into 15-minute intervals and all the evaluation criteria require authentication so unauthenticated calls cannot be made to the API.

●      The API is based on HTTP (over SSL), so the processes that require a specific HTTP method will return an error if the request is not correct.

●      There are specific parameters for requests to the API, generated paging and library restrictions to adapt API operation to this social network.

Uses of the Twitter API in your business

As mentioned at the beginning, the Twitter API, like those of other social networks, allows reading user profiles and publications in the social network, as well as generating tweets.

Starting with this last option, which may be easier to understand, a basic use of the Twitter API in your company could be creating and publishing tweets after the occurrence of X requirements, so that whenever a series of circumstances took place, your company’s profile would send out a corresponding tweet. For example, each time someone names your company in Twitter and includes the words “query”, “question”, please” or “thank you”, you can create a default thank you tweet with your company’s maximum response time. Any bot in Twitter or profiles that publish automatic tweets normally uses the streaming Twitter API, based on an app created in this social network. There are thousands of entertaining cases of bots in Twitter, in fact, according to a recent study, 15% of Twitter users are bots.

The use of Twitter is based on accessing user profiles and publications in this social network, so we can create user patterns for our business or find out their degree of experience satisfaction.

Case studies

A specific example: you are an airline and you want to know more about travelers’ experience and the profile of the most frequent travelers. You can use the Twitter API to search for airports where your company flies to that include the word “flight”, thereby obtaining data about how many users have complained on the social network about flight cancellations or delays and, for example, the average number of followers of those users. Thus, even if these users are not your customers, you can find out which airports usually have the most problems and the types of users who use this social network to find this type of information or even as a customer service medium.

Another practical example of how to use the API in a different industry could be to use it for a telecommunications company; social network searches could be used to find out the most common reasons for cancelling the service and, again the profile of the customers most and least satisfied with your services.

In the case of a bank, searches could be made on ATMs and specifically on robberies in ATMs or ATM malfunctions and to take measures, such as expanding security in the places with the most problems. Searches can also be more specifically filtered with terms such as “credit”, “bank”, “satisfied or good”, “customer”, “bank”, “loyal” or “recommendable” to find out which services receive the highest satisfaction ratings from customers using Twitter.

The Twitter API is very easy to use. Here is all the documentation you need to start using the free resources of this social network to obtain more information for your business and better customer service.

How Affinio used the Twitter API to get to know current consumers better

Are you interested in financial APIs? Discover all the APIs we can offer you at BBVA

 

It may interest you