Giter VIP home page Giter VIP logo

jaquearnouxbot's Introduction

jaquearnouxbot

Total stupid retweetbot for twitter in php

Ok Englisch mag ich jetzt nicht. Für Access des Accounts habe ich ich https://github.com/abraham/twitteroauth
verwendet. Wenn der Bot die Challenge absolviert hat tweeten zu dürfen, dann läuft er einfach über Cron auf dem Server.

$oauth = new OAuth(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_URI);

if (!(TWITTER_TOKEN && TWITTER_TOKEN_SECRET)){ $request_token = $oauth->getRequestToken('https://api.twitter.com/oauth/request_token'); $oauth->setToken($request_token['oauth_token'], $request_token['oauth_token_secret']);

$url = 'https://api.twitter.com/oauth/authorize?' . http_build_query(array('oauth_token' => $request_token['oauth_token'])); //system('open ' . escapeshellarg($url)); print "Authorize:\n$url\nEnter the PIN: "; $access_token = $oauth->getAccessToken('https://api.twitter.com/oauth/access_token', NULL, trim(fgets(STDIN)));

printf("define('TWITTER_TOKEN', '%s');\ndefine('TWITTER_TOKEN_SECRET', '%s');\n", $access_token['oauth_token'], $access_token['oauth_token_secret']); exit(); }

$oauth->setToken(TWITTER_TOKEN, TWITTER_TOKEN_SECRET); $oauth->fetch('https://api.twitter.com/1.1/account/verify_credentials.json'); print_r(json_decode($oauth->getLastResponse()));

jaquearnouxbot's People

Contributors

arnoldschiller avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.