I am looking to implement a quora.com -like invite script (http://www.quora.com/contacts) that does the following: (IT'S A GOOD IDEA TO LOGIN TO QUORA AND SEE HOW IT WORKS.
The Logic / Flow
User signs up via oauth provider (site already has oauth 4 providers noted below)... Example: User signs up via FB oauth. (We set extended permission on FB graph that allows us to pull user friend list (Name and FB ID) and we add user friend list (Name +ID) to table. If user wants to invite friend, they click invite and message gets sent to FB account email.
When user is logged into site, we show their friend list, 4 random friends at a time from DB table. Each time page loads, new set of 4 friends will show. See http://awesomescreenshot.com/0241e8l679. We will create and send a canned message once button is pressed. If a friend is already a member, we will show 'follow' button (we have this now) http://awesomescreenshot.com/03e1flv104
Currently, we show suggestions via'simple suggestions script so we can just add code to current script so we can display users friends from db.
Again, current site already uses oauth from Twitter, FB, Google and Yahoo but does not import friends via contact apis ***
FACEBOOK: When a user signs up using FB, the script should pull the new users friend list (Name + FB ID) into db table.
TWITTER: When a user signs up w/ twitter, it should pull following/followers (name + username) into db table
GOOGLE: When a user signs up with Google, it should pull name/email into db table.
YAHOO: When a user signs up with Yahoo, it should pull name/email into db table.
How it works - http://j.mp/141pXzx Also, freelancer .com uses contact apis here: http://www.freelancer.com/friend-invitation/inviteFriends.php