Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions on to setup omniauth for Instagram #11

Closed
sharnie opened this issue Mar 26, 2014 · 1 comment
Closed

Instructions on to setup omniauth for Instagram #11

sharnie opened this issue Mar 26, 2014 · 1 comment

Comments

@sharnie
Copy link

sharnie commented Mar 26, 2014

I'm having a hard time setting this thing up. Maybe I'm doing something wrong or possibly missing a step. I'm new to rails so I appreciate any help.

  1. First I added gem 'omniauth-instagram', '~> 1.0.1' to my gem file
  2. Run bundle install inside terminal
  3. Add
use OmniAuth::Builder do
  provider :instagram, ENV['INSTAGRAM_ID'], ENV['INSTAGRAM_SECRET']
end

to config/initializers/omniauth.rb file
4. To test it out, I added <%= link_to "Sign in with Instagram", "/auth/instagram" %> inside my views.

I keep getting an error saying that route does not exist. (/auth/instagram)

Please help.

@sharnie
Copy link
Author

sharnie commented Mar 27, 2014

I finally found a solution. My call back url should've been http://localhost:3000/auth/instagram/callback and the route should also have get "/auth/:provider/callback" => "what_ever_controller#and_the_action"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants