neilime/facebook

Facebook strategy for Opauth

0.2.3 2017-04-14 13:27 UTC

This package is auto-updated.

Last update: 2019-02-23 09:44:07 UTC


README

Disclaimer :

I forked the repo mainly because of http://stackoverflow.com/questions/31858341/facebook-user-graph-does-not-return-email-php - facebook is not returning email and other details without specifiying a fields URL parameter.

Opauth-Facebook

Opauth strategy for Facebook authentication.

Implemented based on https://developers.facebook.com/docs/authentication/

Getting started

  1. Install Opauth-Facebook:

    cd path_to_opauth/Strategy
    git clone https://github.com/opauth/facebook.git Facebook
  2. Create Facebook application at https://developers.facebook.com/apps/

    • Remember to enter App Domains
    • "Website with Facebook Login" must be checked, but for "Site URL", you can enter any landing URL.
  3. Configure Opauth-Facebook strategy with at least App ID and App Secret.

  4. Direct user to http://path_to_opauth/facebook to authenticate

Strategy configuration

Required parameters:

<?php
'Facebook' => array(
	'app_id' => 'YOUR APP ID',
	'app_secret' => 'YOUR APP SECRET'
)

Even though scope is an optional configuration parameter for Opauth-Facebook, for most cases you would like to explicitly define it. It should be defined in a comma-separated string.

Refer to Facebook Permissions Reference for list of valid permissions..

License

Opauth-Facebook is MIT Licensed
Copyright © 2012 U-Zyn Chua (http://uzyn.com)