Book Image

Mastering Social Media Mining with Python

By : Marco Bonzanini
Book Image

Mastering Social Media Mining with Python

By: Marco Bonzanini

Overview of this book

Your social media is filled with a wealth of hidden data – unlock it with the power of Python. Transform your understanding of your clients and customers when you use Python to solve the problems of understanding consumer behavior and turning raw data into actionable customer insights. This book will help you acquire and analyze data from leading social media sites. It will show you how to employ scientific Python tools to mine popular social websites such as Facebook, Twitter, Quora, and more. Explore the Python libraries used for social media mining, and get the tips, tricks, and insider insight you need to make the most of them. Discover how to develop data mining tools that use a social media API, and how to create your own data analysis projects using Python for clear insight from your social data.
Table of Contents (10 chapters)

The Twitter API

Twitter offers a series of APIs to provide programmatic access to Twitter data, including reading tweets, accessing user profiles, and posting content on behalf of a user.

In order to set up our project to access Twitter data, there are two preliminary steps, as follows:

  • Registering our application
  • Choosing a Twitter API client

The registration step will take a few minutes. Assuming that we are already logged in to our Twitter account, all we need to do is point our browser to the Application Management page at http://apps.twitter.com and create the new app.

Once the app is registered, under the Keys and Access Tokens tab, we can find the information we need to authenticate our application. The Consumer Key and Consumer Secret (also called API Key and API Secret, respectively) are a setting of your application. The Access Token and Access Token Secret are instead a setting for your user account. Your application can potentially ask for access to several users through their...