TwitterOAuth
Documentation and demo site for the TwitterOAuth PHP library.
Development
- Register a Twitter app.
- Set
http://localhost:8000/callback.php
as a "Callback URL" in the newly registered application. - Create
.env
file.cp example.env .env
- Set
CONSUMER_KEY
andCONSUMER_SECRET
in.env
. - Install dependencies.
npm install
- Start dev server.
npm start
- Visit http://localhost:8000/.
Deploy
- Create a Heroku app.
- Register a Twitter app.
- Set Heroku config vars for
CONSUMER_KEY
,CONSUMER_SECRET
, andOAUTH_CALLBACK
. OptionallyGOOGLE_ANALYTICS_ID
andTEMPLATE_CACHE_ENABLED
. - Push code to Heroku.
Update tweet data
- Install
twurl
gem install twurl
- Update tweet data
twurl "/1.1/users/show.json?screen_name=jack&include_entities=true&tweet_mode=extended" > jack.json twurl "/1.1/statuses/show.json?id=20&include_entities=true&tweet_mode=extended" > 20.json
- Format the data
npm run fix