WARNING: pre-experimental, not usable right now. |
---|
cd twitter-poc
lein deps
lein swank
Checkup to verify that you can connect correctly to Twitter locally.
- Go to the
twitter-poc
directory and start a swank server:
cd twitter-poc
lein deps
lein swank
- Setup the security:
- the project needs the file
twitalyse/twitter-poc/src/twitter_poc/secret.clj
- inside you must put (where xxx and yyy are the consumer-secret and the oauth-access-token):
- the project needs the file
(ns twitter-poc.secret)
;;; Where the secret keys are stored.
;;; This file MUST NOT be pushed, it's in .gitignore
(def consumer-secret "xxx")
(def oauth-access-token-secret "yyy")
- In Emacs Slime:
M-x slime-connect
- Load the core:
user> (use :reload 'twitalyse.twitter)
nil
- First query:
user> (first (map :text (latest-tweets 1)))
"Reviens d'un petit tour en ULM au-dessus du Mont St. Michel #cool"
- That’s it !
- Start swank
lein swank
- Connect in Emacs Slime
M-x slime-connect
- In the repl:
(require '[appengine-magic.core :as ae])
(use '[twitalyse.core])
(ae/serve twitalyse-app)
- You should see your app in http://localhost:8080
cd twitalyse
lein appengine-prepare
cd $GAE_SDK/bin
./appcfg.sh update $twitalyse/war/
Install leiningen https://github.com/technomancy/leiningen
Install swank-clojure https://github.com/technomancy/swank-clojure
We don’t want them in the github repo :)
won’t doWARN: blacklisted apis in appengine could pose problems
Yes, https with GAE, doesn’t work (httpsconnection is blacklisted). Even with http it breaks in fact, see this issue.
See issue above.
Note: we will need to use the GAE datastore (see iteration1) Using this api from clojure may not be trivial …
- If we add them each time in the src files, one day it will by pushed by error :)
- should be in a var env, user home, or something
- Loaded from a file which is in .gitignore
(ugly page) Display the number of twitter tagged #sfeir of a hardcoded list of sfeir accounts. [0/4]
- Display as a simple list, with 2 columns :
- twitter name
- full person name
- counter (what about the retweet ? Does it count as a tweet ? KISS! But should be indicated)
- sorted by counter, then twitter name
- count the tweets since the twitter api gives us (5-7 days according to this thread.
- display a last updated (“last updated 3h ago”)
explaination : the twitter query takes a long time (even for one tweet!). So we will need to cache it. It means using the GAE datastore …
it would be nice to have a pretty html page (design is important)
powered by logos (powered by clojure/gae/sfeir)