How to login with facebook by using api

hello sir,
i want to post on facebook through my website by using the API how i use the api of the facebook,twitter,photobucket ect
plse tell me the php code and what are the resources required.

please tell solution as soon as possible its urgent.

Did you mean you want users to be able to login to your
site using their facebook id’s?

This article can help you