Facebook Login (Javascript)

Sample Javascript:

PHP Example (Laravel)

Reference: