Login with faceBook application code

Hi guys,
I am an application developer and I have recently started to take an interest in developing Facebook applications, I however have been having a problem with coming up with a good method that I can use when it comes to logging users into Facebook using my application so I am looking for a script that can enable me to login with facebook application code.
If anyone can provide me with information on this problem please reply to the post.
