A Rails 3 / PostgreSQL app that only allows sign in via Facebook.
1. After a user logs in the first time (Via Facebook), the app creates a new user in the app's users table with its email, gender, profile picture thumb (150px x 150px aprox (and maybe some facebook user id or any other info required to relate this user with it's facebook account). If the user already exists in the database, there is no need to create a new one.
2. The app must be able to import all of the facebook friends of a given user. (for each one, create a user in the database with the same info: email, gender, profile pic, etc. Also, there must be a table called users_friends with the user's id and his friends id's (user_id, friend_id) that must work in BOTH ways, if A is friends with B, then there should be two records 1(user_id: A.id, friend_id: B.id) and 2(user_id: B.id, friend_id: A.id) THIS IS VERY IMPORTANT. If a user has already imported his friends list from facebook and want to import the list again, the system must NOT erase the previous friends and create all records again, but instead it must "Sync" his friends list.
This must work on Heroku, and use the paperclip gem for the images (I will provide the amazon S3 credentials)