Login with Facebook without purchasing costly addons

Can somebody help me out for creating a addon from scratch for logging into site with facebook ?

I’ve already created app on facebook & button for login is ready on my site, but I don’t get how to open session when user logs in with facebook by app_id & secret key.

It’s kind of urgent, so I expect quick replies.

What is your cs-cart version?

cs-cart multivendor 4.0.1