Github Authentication API in Rails - ruby-on-rails

I've been frustrated in my efforts to find information about this because a lot of the links posted on StackOverflow and elsewhere to related topics are 404'd. The Github API only says how to do things from the command line, and none of the gems I've found have given this kind of support. I know, however, that it is possible, because I've seen it done before.
How would I go about getting a user's current Github login information? That is, if a user is logged into Github, I want to find that out and use some of their user information in my website. If they are not logged in, I want to connect to Github to log them in.
Is there a gem for this, and if so, what is it and how does it work (if there isn't sufficient documentation)? If there isn't, then how do I go about using the Github API to do this in Ruby?

For authenticating with github, use the excellent omniauth gem with the (offcial) omniauth-github strategy.
You can see what basic information about the user you will get when the user authenticates with github here.
And here is a list of omniauth strategies that people have posted. For a good getting-started example, see the facebook strategy.

I found this blog post on using the Omniauth-Github gem. Provides a great tutorial top to bottom.
I used it today with no issues. Blog Post: Omniauth-Github Tutorial

Related

Twitter Ruby API: How do I unfollow a person?

I wanted to know if there is any method known as Twitter::unfollow to unfollow a person using Twitter Ruby API.
I have read the documentation provided on Github but it doesn't seem to help me with this issue.
Although it's not in the documentation, an examination of the source shows that you can do
#client.unfollow('stephenfry')

Ruby on Rails with twitter APIs

Is this possible in Ruby on Rails to update your blog posts on your twitter account using twitter APIs and omniauth. Please suggest me.
More: I have a blog, where i create a new post on blog, this update should go to my twitter account as well as I tweet , this tweet should be shown to my home of blog.
Please suggest me. how it is possible.
Regards,
Vieenay Siingh
When you post to this website, we are expecting you to have done a background search before.
Anyway, you should find what you need On the rubygems website

Posting a comment on a page through native iOS UI

Ok so I've scoured the docs and stackoverflow for an answer, but maybe I'm asking the wrong questions or looking in the wrong places. I'm working on an native iOS app and I want to give the user a way to post a comment to a page, but through native UI and not through a UIWebView with the comments plugin embedded. I can make a comment on a comment on the page, but I can't seem to make a comment from an authenticated user on the page itself. Is this even possible?
Apple's URL Loading System provides you with the ability to set credentials for basic HTTP authentication, but it sounds like you're talking about logging in to some kind of forum system. The way those generally work is that you send your credentials to the site, and get an authentication cookie back. You then need to provide that cookie to the system when you interact with the site.
Here's a blog post with an example of how to do that.

Using eventbrite api gem

I'm trying to build an app around information from the eventbrite API. I stumbled upon this unofficial eventbrite gem (https://github.com/therabidbanana/eventbrite) but can't figure out what the usage terms mean:
require 'eventbrite'
Eventbrite.setup("APP_KEY")
user = Eventbrite::User.new("USER_KEY") #=> <Eventbrite::User >
user.venues #=> [<Eventbrite::Venue>,...] # Venues the user has defined
I've included the gem in my gemfile, run bundle install, but can't figure out how to pull a user's events.
Anyone willing to help me out?
therabidbanana has released a very full-featured gem, but I'm not sure if he is currently maintaining or supporting it.
I would recommend contacting him (via GitHub) with questions, or taking a look at Eventbrite's official gem:
https://github.com/ryanjarvinen/eventbrite-client.rb
More information regarding open-source code related to Eventbrite is available on their GitHub page: http://eventbrite.github.com
Feel free to contact Eventbrite's developer relations team if you have additional questions:
http://developer.eventbrite.com/contact-us

Rails 3 facebook plugin/gem?

Does anyone know of a good Rails 3 compatible gem or plugin that support the Facebook API (rather Graph API but old REST is ok too)? Mostly for getting profile picture, info, friends and posting on wall.
I am looking for something that seems to be maintained well so I know I can count on it in the future as well.
Koala :- A lightweight, flexible library for Facebook with support for OAuth authentication, the Graph and REST API's, real time updates, and test users.
https://github.com/arsduo/koala
OAuth2
http://intridea.com/2010/4/22/oauth2-gem-just-in-time-for-facebook-graph
http://github.com/intridea/oauth2
I found Mini_fb as quite good one. Try it.
Well written, well maintained (as at time of posting) https://github.com/nov/fb_graph

Resources