Advertisement
BhieNEka

twitter.php

Apr 1st, 2013
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. <?php
  2. require_once('/home/user/public_html/bot_twit/twitteroauth.php');
  3. define('CONSUMER_KEY', 'CONSUMER_KEY_KAMU');
  4. define('CONSUMER_SECRET', 'CONSUMER_SECRET_KAMU');
  5. define('ACCESS_TOKEN', 'ACCESS_TOKEN_KAMU');
  6. define('ACCESS_TOKEN_SECRET', 'ACCESS_TOKEN_SECRET_KAMU');
  7. $twitter = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);
  8. $twitter->host = "https://api.twitter.com/1/";
  9. if(!empty($_GET['bot'])){
  10. $status = $_GET['bot'];
  11. } else {
  12. $status = "Bot Twit ini dipersembahkan oleh http://bhieneka.blogspot.com";
  13. }
  14.  if(strlen($status) > 140) $status = substr($status, 0, 139);
  15.  $twitter->post('statuses/update', array('status' => $status));
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement