Introducing Social Graph - Part 2
Introducing Social Graph - Part 2
Social Graph
• A social graph is created through this widespread interaction and
exchange of information on social media.
• A social graph is a massive network that illustrates the relations
between individuals and information on the internet
• User graph: This is a network that shows the relationships between
users or individuals connected to each other.
• Content graph: The relationship existing between different types of
content (text, images, videos, or multimedia) uploaded on social
media
• Interest graph: The interest graph takes the original graphs a step
further, where individuals on the social media or the internet are
not related based on their mere links, like being added as a friend
or followed on Twitter, but on their mutual interests.
SOCIAL WEB ALONG WITH DATA
MINING
SOCIAL WEB ALONG WITH DATA MINING, ANALYSIS,
AND VISUALIZATION TECHNIQUES TO EXPLORE DATA
• Who knows whom, and which people are common to their social networks?
• How frequently are particular people communicating with one another?
• Which social network connections generate the most value for a particular niche?
• How does geography affect your social connections in an online world?
• Who are the most influential/popular people in a social network?
• What are people chatting about (and is it valuable)?
• What are people interested in based upon the human language that they use in a
digital world?
The answers to these basic kinds of questions often yield valuable insights and
present (sometimes lucrative) opportunities for entrepreneurs, social scientists
What is an API?
• API is the acronym for Application Programming Interface
• A software intermediary that allows two applications to talk to
each other.
• When you use an application on your mobile phone, the
application connects to the Internet and sends data to a server.
• The server then retrieves that data, interprets it, performs the
necessary actions and sends it back to your phone
EG: Searching Flights Online
• If you are using an online travel service, Expedia, interacts with
the airline’s API.
• The API is the interface with which the online travel service
interacts to get information from the airline’s database to book
seats, baggage options, etc.
• The API then takes the airline’s response to your request and
delivers it right back to the online travel service
• The online travel service then shows you the most updated,
relevant information.
API
Application Programming Interface
• A set of instructions and standards to access a web based software
application.
• APIs allow users to send a request for a particular resource, such as
Facebook or Twitter, and receive some data in response.
• It is worth noting that all API providers fix some limitations on the quantity
or type of data which users can obtain
• Social media also started creating APIs to share their data with third-party
application developers
• The nature of all social media is different, so are their APIs.
Different types of API
• Two types of API are
• RESTful API
• Stream API
RESTful API
• The most common type of API that most social media provides.
• The information from a REST API is static and is from historical data.
• The back history of data can vary from platform to platform.
• Facebook calls its REST API service Graph API.
RESTful API
• REST stands for Representational State Transfer and it relies on the HTTP
protocol for data transfer between machines.
• Web APIs that adhere to the REST architectural constraints are called
RESTful APIs
• It has been created to simplify the transfer of data between machines
• Two of the most important uses of RESTful services are:
• Stream API is used when the requirement is to collect data in real time,
instead of backdated from the platform.
• The Stream API of Twitter is widely used to collect real-time data from Twitter.
Advantages of social media APIs
• Social data: APIs allow you to extract valuable data around Social Media
users and content that is used for behavioral analysis and user insights.
• App development: Thousands of software and applications have been built
using Social Media APIs that provide additional services on top of Social
Media platforms.
• Marketing: Social media APIs are useful in automating marketing activities
such as social media marketing by posting on platforms. It also helps in
enriching marketing data through Social Data acquired about customers.
Limitations of social media APIs
• Rate limits:
• Social media companies need to take into account the amount of data that
enters or leaves their systems.
• The amount of data and the speed of receiving are clearly stated by most
social media platforms. This should be included in the extraction strategy.
• API changes:
• Social media platforms are free to change or stop their API services. Such
kinds of change or stoppage could severely impact development or
analytics strategies.
• The only advice in such situations is to be prepared for it and have flexible
systems to be able to adapt to the changes.
• Legal:
• This challenge is mainly in the use cases around social media APIs.
• The rules and regulations for social media platforms are strict about the
type of usage of its data and services.
• Any use of data from APIs that doesn’t conform to the stipulated regulations
risks legal implications.
Connecting Principles of APIs
• Connecting to social media platforms and using their API data services require a
few steps to be configured before usage. There are nuanced differences
between different platforms, but the following are the general steps that are
applicable to almost all:
STEP 1:
• APP registration: Almost every social media platform needs you to register your
application on their website. It involves entering personal information and the
objectives in using their API services. This step results in the generation of
certain keys, which are called authentication and consumer keys.
STEP 2:
• Authentication: Use the consumer keys (also called authentication keys)
generated from the previous step to authenticate your application.
STEP 3:
• API endpoint hunting:
• When an API interacts with another system, the touchpoints of this
communication are considered endpoints.
• An endpoint can include a URL of a server or service.
• Each endpoint is the location from which APIs can access the resources
they need to carry out their function.
• The API endpoints will be different for each provider, so it is necessary
to read the provided documentation to identify which end points best
correspond to your needs.
• EG:
• The Twitter REST API allows clients to retrieve a sample of tweets based on
search criteria
• The endpoint URL for this resource is
https://api.twitter.com/1.1/search/tweets.json
INTRODUCTION TO
AUTHENTICATION
TECHNIQUES
What is OAuth?
• OAuth is an authorization protocol that allows users to share data
with an application without sharing the password.
• It is a way to obtain a secure authorization scheme based on a
token-based authorization mechanism.
• There are two API authentication models using OAuth:
• User authentication
• Application authentication
User authentication