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

SitePoint PHP Blog:
How to Build a Twitter Follower-Farmer Detection App with RestDB
May 31, 2017 @ 12:17:03

The SitePoint PHP blog has a tutorial posted for the Twitter users out there showing you how to create a "follower-farmer" detection tool that will scan your account for followers that track your account and then soon after unfollow as a means of gaming the follower system.

Are you active on Twitter? If so, do you often wonder why some accounts seem to follow you only to unfollow you moments (or days) later? It’s probably not something you said – they’re just follower farming.

[...] Follower farming is a known social media hack taking advantage of people who “#followback” as soon as someone follows them. [...] In this post, we’ll build an app which lets you log in via Twitter, grabs your followers, and compares the last fetched follower list with a refreshed list in order to identify the new unfollowers and calculate the duration of their follow, potentially auto-identifying the farmers.

They use a Homestead VM and a fresh Laravel installation to create their application. It makes use of the Socialite package to connect to Twitter using your application's client ID and secret. The application then makes use of the guzzlehttp/oauth-subscriber package to connect to the Twitter API and get a list of current followers. The post also includes the code to create a "FollowerServiceProvider" to make it simpler to get the follower information. He then shows how to set up the RestDB account and push the follower content out to it for storage. The tutorial wraps up with the code required to analyze the followers against "unfollowers" and report back the results.

tagged: twitter follower farmer detect application laravel tutorial

Link: https://www.sitepoint.com/how-to-build-a-twitter-follower-farmer-detection-app-with-restdb/

NetTuts.com:
Building With the Twitter API: Analyzing Your Followers
Apr 10, 2017 @ 12: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

Developer Drive:
How to build an auto-ranking Twitter list with WordPress
Oct 23, 2015 @ 13:55:36

On the Developer Drive site there's a tutorial posted showing how to create a dynamic auto-ranking Twitter list in a WordPress-based application.

My team and I recently built an awesome list template on WordPress that ranks a set of Twitter users based on follower count. It allows a content writer to easily add a list of Twitter handles, and generate a well designed post.

They start with a list of requirements the end result needs to meet including the Twitter information, features it should offer and the resulting output. The rest of the post walks you through every step of the process to get the system set up including:

  • installing the Advanced Custom Fields Pro WordPress plugin
  • Showing an "infinite list" in WordPress
  • Code to loop through the Twitter data
  • using the TwitterAPIExchange PHP library to get Twitter data

All code and steps you'll need to make the system work are included and they've posted a demo so you can see the result first hand.

tagged: autorank wordpress list twitter follower count api interface tutorial

Link: http://www.developerdrive.com/2015/10/how-to-build-an-auto-ranking-twitter-list-with-wordpress/