I've been working on a large Twitter Metrics project for a while now but one vexing thing in this experiment is showing non-followers. It should be a simple task, but it hasn't been. Using sites like justunfollow and twitterkarma i've verified my following but not following back count to be 2,058. No matter how many times I run my software [In addition to shuffle() I have manually iterated through the entire follow list - if someone has a better method let me know please (API Rate Limiting :/).

So here is the disparity, my code shows 1,518 non-followers. sites designed to calculate this showed earlier today 2,058. A lot of things could be going wrong here, maybe someone can point me in the right direction. I'm using Abrahams PHP Twitter OAuth on PHP 5.3 w/ MYSQL:


CREATE TABLE `NonFollowers` (
  `UserID` int(11) NOT NULL,
  `Screenname` varchar(255) NOT NULL,
  `DateAdded` datetime NOT NULL,
  UNIQUE KEY `UserID` (`UserID`)


        public function GetFollowing() {

                $method = 'friends/ids';
                $following = $this->connection->get($method);
                echo count($following);
                return $following;

        public function StatisticsNonFollowers() {
                $Following = $this->GetFollowing();
                $NonFollowersInDB = $this->GetNonFollowers();
                $NonFollower = array();

                for ($i = 0; $i < count($Following); $i++) {

$parameters = array('source_id' => $this->myID, 'target_id' => $Following[$i]);
                        $method = 'friendships/show';
                        $FollowBack = $this->connection->get($method, 
                        $HTTP_Response = $this->connection->http_code;
                        if ($HTTP_Response != 200) {
                                die("Received HTTP response of 
                        $FollowingBack = 
                        if ($FollowingBack != 1) {
                                $Screenname = 
                                $ID = $Following[$i];
                                $NonFollowers[$i] = $ID;
                                $DateAdded = date("Y-m-d H:i:s");

$query = "INSERT IGNORE INTO NonFollowers (UserID, Screenname, DateAdded) VALUES ($ID, '$Screenname', '$DateAdded')";
                                $rows = $this->DB->insert_sql($query);



Any help for discovering this disparity would be great helpful! Thanks in advance group.

- Slate.

Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 

Reply via email to