I have some code that looks like this:
As long as user.google is a valid token provided by oauth you will get back a list of the user's contacts from gmail.
That is unless you have the Fireeagle gem included in your application. In that case you will spend the night swearing like a sailor and then weeping openly like a little girl. If you include fireeagle 0.8.0.1 in your project and make that call you will get an error like this:
Continue Reading →
ActionView::TemplateError (wrong number of arguments (1 for 0)) on line #7 of /Library/Ruby/Gems/1.8/gems/muck-invites-0.1.12/app/views/invites/_gmail_oauth.erb: /Library/Ruby/Gems/1.8/gems/oauth-0.4.0/lib/oauth/consumer.rb:154:in
create_http' /Library/Ruby/Gems/1.8/gems/oauth-0.4.0/lib/oauth/consumer.rb:154:inrequest' /Library/Ruby/Gems/1.8/gems/oauth-0.4.0/lib/oauth/tokens/consumer_token.rb:25:in
For quite a while I've been wanting to play with OAuth and now that I've been able to spend some time playing with it I have to say it is awesome. Instead of asking for a user's username and password for a given service (like their GMail or LinkedIn account) you instead have the user log into their account and grant your application access. The benefit is that your application doesn't have to figure out how to securely store a bunch of extra usernames/passwords and the user can turn off access anytime they feel like they need to reclaim their privacy.
In Rails the way to work with OAuth is the OAuth gem and the OAuth-Plugin gem which take almost all the pain out of implementing an OAuth solution. A big thanks to Pelle Braendgaard for a great library.
I won't go into all the details on how to implement the gems in your project. Instead checkout the README for each gem and the articles on Pelle's blog: Developing OAuth clients in Ruby, Major update to Ruby on ...Continue Reading →
I have been pitching this idea of a distributed social network to everyone that can stand to listen to me. I realize that the conversation around WordPress and the future of social networking is heating up, but as it does I think it is important to begin thinking about implementation. It is fun to philosophize, but at the end of the day users want some toys to play with.
Chris Messina lays out his vision and the particular functionality associated with it on his wiki. Automattic picked up Buddy Press, and the code is still available on Google Code. For historical reasons here's a thread on the WPMU forums about the activity around Buddy Press. There is another social plugin for WordPress called Xiando]4 that hasn't gotten a lot of attention. We are going to do our part and contribute as well.
As part of an effort to build a social network for Teachers Without Borders we came to a realization that it would be hypocritical to create a network filled with borders. Thus, we began t...Continue Reading →