Kai Hendry e363394b90 Fixing #55
2015-12-21 09:01:32 +00:00
2015-10-10 16:59:38 +08:00
2015-12-21 09:01:32 +00:00
2015-12-21 09:01:32 +00:00
2015-12-21 09:01:32 +00:00
2015-10-25 18:55:17 +08:00
2015-10-01 21:54:48 +08:00
2015-10-25 21:23:09 +08:00

http://greptweet.com

Offline Greptweet on Chrome IOS

  • Image VIRTUAL SIZE <100MB (Docker)
  • Uses HTML offline feature
  • Aims to suck less by keeping lines of code low
  • Can run from command line
  • Please review and comment on the code!

Known limitations

  • API only allows 3200 tweets to be downloaded this way at one time :(
  • 300 API limit using a Application only Auth bearer token (which doesn't seem to expire...)
  • Won't work on protected accounts (duh!)
  • No @mentions or DMs from other accounts

API

Invoke a fetch of a TWITTER_USERNAME by accessing the URL:

http://greptweet.com/f/TWITTER_USERNAME

Last 4 tweets:

curl --compressed -s http://greptweet.com/u/webconverger/tweets.txt | head

Getting a Bearer Token

When you clone and attempt to run this opensource project you will notice that you are missing a secret.php file, this file contains one setting $bearer_token. To create a bearer token:

  1. Create a new Twitter app

  2. Under OAuth settings, make a note of the Consumer key and Consumer secret

  3. Now retrieve the bearer token by building a request with curl:

    curl -X POST --verbose "https://api.twitter.com/oauth2/token" -d "grant_type=client_credentials" -u consumerKey:consumerSecret

The response should end like:

{"access_token":"SECRETEXAMPLESTRING","token_type":"bearer"}

Save that SECRETEXAMPLESTRING to www/secret.php:

<?php
$bearer_token = 'SECRETEXAMPLESTRING';
?>
Description
Sane twitter backup and search
Readme MIT 1,023 KiB
Languages
PHP 42%
JavaScript 21.8%
Shell 16.8%
HTML 6.6%
Dockerfile 5%
Other 7.8%