Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NetTuts.com:
Building With the Twitter API: Analyzing Your Followers
Apr 10, 2017 @ 17:18:14

On the TutsPlus.com site Jeff Reifman has posted the latest article in his "Building with the Twitter API" series. In this latest tutorial he shows how, with the Yii2 application they've been building, to analyze your followers and get information like followers, tweets, favorites, etc.

Welcome to the latest episode of our Twitter API series. In our last episode, I built Twixxr.com which will let you discover influential women on Twitter for your account to follow. Today, I'm going to turn the focus inward to look at my own followers.

[...] For a long time I've wanted to look more closely at my Twitter followers and answer some questions: Who exactly is following me? And why aren't they more interactive? Is it possible that only 10% of my followers are real people? [...] The Twitter API is a good tool to investigate this. Yet it has a ton of rate limits which make even something simple like analyzing your followers quite complex. In today's episode, I'll show you how I worked with the rate limits to assess and build a scoreboard of my followers.

He starts with a screenshot of the ultimate result of gathering the information for each follower from the API and describes what the overall goals are. From there's it's all about the code:

  • creating database migrations for the related tables
  • making the connection to the Twitter API to gather follower data
  • saving the data to the database
  • creating the "score" for each based on if the account is verified, protected, and follower/friend count

The post ends with the code to show the "scoreboard" presented in the original screenshot having all of the information populated for his follower set.

tagged: tutorial yii2 framework analyze follower score tutorial series

Link: https://code.tutsplus.com/tutorials/building-with-the-twitter-api-analyzing-your-followers--cms-27523


Trending Topics: