forked from theodo/sfFacebookConnectPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
A Facebook Connect plugin for symfony that lets you add easily Facebook connect to your symfony website and/or develop IFrame-FBML agnostic Facebook applications
License
cheoppy/sfFacebookConnectPlugin
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
sfFacebookConnectPlugin
=======================
The sfFacebookConnect plugin:
* helps easily setup a Facebook Connect authentification on a symfony project using sfGuardUser
* is also a good wrapper to create a Facebook application using symfony
Installation
------------
* Install the plugin: the __git__ and recommended way
$ git submodule add https://github.com/theodo/sfFacebookConnectPlugin.git plugins/sfFacebookConnectPlugin
$ cd plugins/sfFacebookConnectPlugin
$ git submodule init # add the facebook php-sdk as a submodule
$ git submodule update
# or all in one
$ git submodule add --recursive https://github.com/theodo/sfFacebookConnectPlugin.git plugins/sfFacebookConnectPlugin
* Create your application on Facebook
https://www.facebook.com/developers/
* Configure your `app.yml` file with all the correct settings
[yml]
# default values
all:
facebook:
api_key: xxx
api_secret: xxx
api_id: xxx
redirect_after_connect: false
redirect_after_connect_url: ''
connect_signin_url: 'sfFacebookConnectAuth/signin'
app_url: '/my-app' # the facebook application canvas url
guard_adapter: ~ # to customise a guard adapter
js_framework: none # none, jQuery or prototype.
# It is highly recommended to use a js framework if you want a correct experience in IE
sf_guard_plugin:
profile_class: sfGuardUser
profile_field_name: id
profile_facebook_uid_name: facebook_uid
profile_email_name: email_address
profile_email_hash_name: email_hash
facebook_connect:
load_routing: true
user_permissions: []
* Extend the `sfGuardUser` schema to add the 2 new columns needed
[yml]
# Doctrine schema sample
sfGuardUser:
columns:
facebook_uid: integer(5) # Must be BIGINT to fit Facebook's uids
email_hash: varchar(255)
indexes: # optional but recommended for performance
facebook_uid_unique:
type: unique
fields: [facebook_uid]
* Enable the auth module in your `settings.yml`: `sfFacebookConnectAuth`
[php]
all:
.settings:
enabled_modules: [default, sfFacebookConnectAuth]
* (Optional) Enable the sample module in your `settings.yml`: `sfFacebookConnectDemo`
[php]
all:
.settings:
enabled_modules: [default, sfFacebookConnectAuth, sfFacebookConnectDemo]
* Optionally use the sfFacebook filters
* etc. A lot still needs to be documented.
* Clear your cache
$ php symfony cc
* Publish the plugin assets
$ php symfony plugin:publish-assets
About
A Facebook Connect plugin for symfony that lets you add easily Facebook connect to your symfony website and/or develop IFrame-FBML agnostic Facebook applications
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- PHP 74.3%
- JavaScript 25.7%