2014-07-11 15:25:59 +08:00
2014-07-11 14:44:35 +08:00
2013-07-28 18:08:06 +08:00
2012-08-10 18:36:10 +02:00
2014-07-11 15:25:59 +08:00
2014-01-17 08:42:13 +00:00
2014-01-26 14:11:07 +00:00
2014-06-02 17:01:26 +00:00
2014-06-02 17:01:26 +00:00
2014-07-11 14:44:35 +08:00
2014-04-05 11:18:41 +02:00
2014-07-11 14:44:45 +08:00
2013-07-14 20:52:04 +08:00
2014-06-02 17:01:26 +00:00
2014-07-11 14:44:35 +08:00

http://greptweet.com

Offline Greptweet on Chrome IOS

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

Fetch your tweets manually by accessing the URL:

http://greptweet.com/f/TWITTER_USERNAME

Last 4 tweets:

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

Getting a Bearer Token

When you clone and attempt to run this 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 secret.php:

<?php
$bearer_token = 'SECRETEXAMPLESTRING';
?>

nginx configuration

server {
	server_name greptweet.com;
	root /srv/www/greptweet.com;
	charset utf-8;
	access_log /var/log/nginx/greptweet.access.log;
	error_log /var/log/nginx/greptweet.error.log;

	location / {
		index index.php index.html;
		rewrite ^/f/(.*)$ /create.php?id=$1 last;
	}

	location ~ \.php$ {
		try_files      $uri = 404;
		fastcgi_pass   unix:/run/php-fpm/php-fpm.sock;
		fastcgi_index  index.php;
		include        fastcgi.conf;
	}
}
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%