This zip has a working example of LOGIN and REGISTRATION using Facebook PHP SDK.