Development

Changeset 24367

You must first sign up to be able to contribute.

Changeset 24367

Show
Ignore:
Timestamp:
11/25/09 09:05:11 (4 years ago)
Author:
dwhittle
Message:

sfFacebookPlugin: imported sfFacebookPlugin (merge of sfFacebookConnectPlugin + sfFacebookPlugin)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfFacebookPlugin/LICENSE

    r4216 r24367  
    1 Copyright (c) 2007 Jonathan R. Todd 
    21 
    32Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 
  • plugins/sfFacebookPlugin/README

    r4216 r24367  
     1sfFacebookPlugin 
     2================ 
     3 
    14Welcome to the Facebook Platform! 
    25 
     
    710 
    811We've created an application called Footprints that utilizes a lot of Platform 
    9 functionality while remaining fairly simple.  If you don't want to set it all 
    10 up you can still check out the code and see it in action by going to 
    11 http://apps.facebook.com/footprints/. 
    12  
    13 To get Footprints running on your own server, you'll want to first open up the 
    14 "footprints/config.php" file and modify it with your mysql database 
    15 configuration.  Also, create the necessary table in your database as described 
    16 in the same file. 
     12functionality while remaining fairly simple. 
    1713 
    1814Next, go to http://www.facebook.com/developers/apps.php, where you'll 
     
    3228and you should have Footprints up and running on your server! 
    3329 
    34 NOTE: If you only have PHP4, we've built a modified version of the client 
    35 library to work with that.  Use the files inside the php4client directory 
    36 instead of client.  You'll need to download simplexml44 and extract it into the 
    37 php4client/ directory to get it to work - you can get it at: 
    38 http://downloads.sourceforge.net/ister4framework/simplexml44-0_4_4.tar.gz 
     30The sfFacebook plugin : 
     31 
     32  * helps easily setup a Facebook Connect authentification on a symfony project using sfGuardUser 
     33 
     34  * is also a good wrapper to create a Facebook application using symfony 
     35 
     36Installation 
     37------------ 
     38 
     39 
     40  * Install the plugin 
     41 
     42        $ svn co http://svn.symfony-project.com/plugins/sfFacebookPlugin/trunk sfFacebookPlugin 
     43 
     44  * Create your application on [Facebook developers](http://www.facebook.com/developers/ "Facebook for developers") 
     45 
     46  * Configure your app.yml file with all the correct settings 
     47 
     48    # default values 
     49    all: 
     50      facebook: 
     51        api_key: xxx 
     52        api_secret: xxx 
     53        api_id: xxx 
     54        callback_url: http://www.yourserver.com 
     55        app_url:      http://apps.facebook.com/your-app 
     56 
     57      sf_guard_plugin: 
     58        profile_class: sfGuardUserProfile 
     59        profile_field_name: user_id 
     60        profile_facebook_uid_name: facebook_uid 
     61        profile_email_name: email 
     62        profile_email_hash_name: email_hash 
     63 
     64      facebook_connect: 
     65        user_permissions: [] 
     66 
     67 
     68  * Modify your sfGaurdUserProfile schema to add the 3 new columns needed 
     69 
     70    # Doctrine schema sample 
     71    sfGuardUserProfile: 
     72      tableName:     sf_guard_user_profile 
     73      columns: 
     74        user_id:          integer(4) 
     75        first_name:       varchar(20) 
     76        last_name:        varchar(20) 
     77        facebook_uid:     integer(4) 
     78        email:            varchar(255) 
     79        email_hash:       varchar(255) 
     80      relations: 
     81        sfGuardUser: 
     82          type: one 
     83          foreignType: one 
     84          class: sfGuardUser 
     85          local: user_id 
     86          foreign: id 
     87          onDelete: cascade 
     88 
     89 
     90  * Enable the auth module in your `settings.yml`: sfFacebookAuth 
     91 
     92            [php] 
     93            all: 
     94              .settings: 
     95                enabled_modules:      [default, sfFacebookAuth] 
     96 
     97  * Optional: enable the sample module in your `settings.yml`: sfFacebookDemo 
     98 
     99            [php] 
     100            all: 
     101              .settings: 
     102                enabled_modules:      [default, sfFacebookAuth, sfFacebookDemo] 
     103 
     104  * Clear your cache 
     105 
     106        $ php symfony cc 
     107 
     108  * Publish the plugin assets 
     109 
     110        $ php symfony plugin:publish-assets 
  • plugins/sfFacebookPlugin/config/app.yml

    r4219 r24367  
     1# default values 
    12all: 
    2   facebook_api_key:       'YOUR_API_KEY' 
    3   facebook_secret_key:    'YOUR_SECRET' 
     3 
     4  sf_facebook_plugin: 
     5    routes_register: false 
     6 
     7  sf_guard_plugin: 
     8    profile_class:                sfGuardUserProfile 
     9 
     10  facebook: 
     11    # facebook app settings 
     12    application_name: 
     13    application_id: 
     14    api_key: 
     15    api_secret: