A Small Web Application Ruby Skeleton:
- Provides a foundation for building a website that interacts with the Twitter API. LATEST Also includes a number of implementations of Giphy and YouTube API as well.
- Provides a basic model/view/controller (MVC) project to allow students to understand basic web design.
- Follow steps at the bottom of this README to create a Twitter Consumer Key/Secret
- Clone repository:
cd ~/Documents; git clone https://github.com/pongo-pygmaeus/intro-to-ruby-with-twitter-api
- Use your terminal to access the newly created directory:
cd ~/Documents/intro-to-ruby-with-twitter-api
- Type
bundle install
- Make a new file called
.env
:touch .env
- Open
.env
in a text editor and add the following keys (DBC recommends either Sublime Text Editor or Atom)
TWITTER_CONSUMER_KEY=[Your Twitter API Consumer Key from Twitter Developer Console]
TWITTER_CONSUMER_SECRET=[Your Twitter API Consumer Secret from Twitter Developer Console]
Type bundle exec shotgun
- Visit
https://dev.twitter.com/resources/signup
- After signing up, visit
https://apps.twitter.com
- Click on your email address
- Click on the tab titled
Keys and Access Tokens
- Observe the section of the page called
Application Settings
- Take note of the fields called
Consumer Key (API Key)
andConsumer Secret (API Secret)
. Use this information in step 5 of theQuickstart
steps.