How can I do this? (Facebook and other questions)

Hi,

How can I do this:

1º-Registration form with button “connect with Facebook”

2º-Get the ID of user and save in my own server for count the registration in real time.

3º-Know in what level be the user by my server (when the user have internet connection I can see in what level he/she be).

4º-Know the device that user use.

If you not know some question but know others, please reply to me too.

Thanks in advance!