You need external server to do the facebook login itself.
Note: Facebook does not allow (any more) "Like Gating". This means, you are NOT allowed to force the user to give you a "Like" before he gets your service. however, you might ASK for a "like", and the user might do so, or decline.