Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

code extracted from dopplr.com to import social networks from various sites

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 tasks
Octocat-spinner-32 test
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 init.rb
Octocat-spinner-32 install.rb
Octocat-spinner-32 uninstall.rb
README
IdentityMatcher
===============

This is a Rails plugin that adds the ability to import social networks from sites such as Twitter and Gmail. Put it in your vendor/plugins directory. 


Example
=======

Add this line to your app's User model:

  matches_identities :nickname_field => 'username', :email_field => 'work_email'

and your user model will gain the following methods:

  User.match_gmail(username, password)
  User.match_gmail_api(authsub_token)
  User.match_twitter(nick)
  User.match_hcard(url)
  etc...

The return value is a two-element list. The first element is a list of User objects that match the identities found in the external source. The second element, if available for that mode of matching, is a list of found external identities that weren't matched, giving their name and email address in a hash.

The default values for matches_identities are:
  :nickname_field => 'nick'
  :email_field => 'email'

Contributing
============

Git source repository: http://github.com/mattb/identity-matcher/tree/master
Please feel free to fork the project at GitHub and submit pull requests or patches.

Copyright (c) 2007-2008 Matt Biddulph, released under the MIT license
Something went wrong with that request. Please try again.