If i am correct in my understanding, all you want is to use Oauth or Open Id system to let user register and login to your website using Facebook or any other such service provider.
If i am correct in my understanding, there is a very good library which is quite easy to use and very light weight.
It also contains few examples which shows how to use it and how it works, let us know if this is what you are looking.