Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Viewfinder

The Viewfinder

http://www.meetup.com/nyc-on-rails/

Presentation by Eugene, Erin & Jesse for NYC on Rails, on April 4th, 2013. Introducing ViewFinder, our instagram powered game. ViewFinder turns your Instagram feed into a location guessing game. Drag & drop map markers to where you think a photo was taken. Try to get as close to the photo location as possible and challenge your friends to beat your guess. Get to know New York City through the eyes of New Yorkers.

Gems used: Geocoder, Figaro, Instagram, Sidekiq, Twitter Bootstrap

https://github.com/eewang/view_finder

hashtagerinl

April 05, 2013
Tweet

Other Decks in Technology

Transcript

  1. IMAGE SLIDERS Trial & Error : 1. Twitter Bootstrap’s Carousel • 

    https://github.com/seyhunak/twitter-bootstrap-rails 2. Foundation’s Orbit •  http://foundation.zurb.com/docs/rails.html 3. ResponsiveslideJs •  http://responsive-slides.viljamis.com/
  2. INSTAGRAM API Register •  http://instagram.com/developer/ •  Assign Oauth client_id and

    client_secret for your application Authenticate •  User authenticates & authorizes application with Instagram Start making requests! •  Make requests to Instagram API Endpoints
  3. class InstagramController < ApplicationController def index Instagram.configure do |config| config.client_id

    = ENV['INSTAGRAM_APP_ID'] config.client_secret = ENV['INSTAGRAM_SECRET'] config.access_token = ENV['INSTAGRAM_TOKEN'] end end end Good info: http://railsapps.github.com/rails-environment-variables.html 'INSTAGRAM_APP_ID' 'INSTAGRAM_SECRET' 'INSTAGRAM_TOKEN'
  4. VIEW <ul> <% @yourfeed.each do |f| %> <li style="list-style: none;">

    <%= image_tag f.images.standard_resolution.url %> <% end %> </ul> Instagram API Gem: instagram-ruby-gem / lib / instagram / client / users.rb CONTROLLER session[:access_token] = response.access_token # access token from user who just logged in client = Instagram.client(:access_token => session[:access_token]) @yourfeed = client.user_media_feed