function __construct($args) { parent::__construct($args); $this->username = '******'; $this->password = '******'; if ($this->username == "YOUR VINE USERNAME" or $this->password == "YOUR VINE PASSWORD") { die("[Error] You need to set your Vine's account user/password at /robots/Vine/Vine.php" . PHP_EOL); } }
function __construct($args) { parent::__construct($args); $this->toa = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET); if (!is_object($this->toa)) { die('TwitterOAuth failed to initialize. Check your Twitter credentials at /robots/Twitter/Twitter.php' . PHP_EOL); } $this->toa->get('account/verify_credentials'); if ($this->toa->http_code != 200) { die('Unable to authenticate with Twitter' . PHP_EOL); } // get all friends $friends = $this->toa->get('friends/ids', array('cursor' => -1)); $this->friendIds = array(); foreach ($friends->ids as $id) { $this->friendIds[] = $id; } // get all favorites to prevent re-favorite $favorites = $this->toa->get('favorites', array()); $this->favoritesIds = array(); foreach ($favorites as $fav) { $this->favoritesIds[] = $fav->id; } }
function __construct($args) { parent::__construct($args); echo '[i] If nothing is returned, check if account is private or not exists' . PHP_EOL; echo '[Scraping ...]' . PHP_EOL; }