Facebook integration

Facebook integration


Job Description

I want the users to be able to easily register to AND share my website via Facebook Conect or Google+ Connect in one action.
Therefore I want to put two buttons (FB an G+) on the registration page of my website. I want the following functionality:

1. When the user clicks on one of these buttons, a corresponding popup will appear and the user will log-in (if needed) and "allow" the request.
Once user "allowed" the request, he is registered (i.e. my website captures user's credentials and saves in a database)

2. The popup will then let the user press on a button "Share".

3. Now here comes the tricky part: after the user pressed either "Share" button, the popup closes, and the website loads a specific page.
It might be tricky since although the user presses the button in a 3rd-party popup, my website has to react to it and update accordingly. Please let me know if you did something similar and know exactly how to make it work or how to work around it.

4. (Is this possible?) When the next page loads up, the user can see a list of his facebook (or G+) friends and he's able to select some friends and then the website will allow him to send these friends an anonymous email. It means that the website will "pull" the list of the users' friends and their emails. Then an email will be sent to these emails from the website saying "one of your friends invited you to this website".

Skills: facebook