Giter VIP home page Giter VIP logo

ohfosfacebookuserbundle's Introduction

OhFOSFacebookUserBundle

An example integration of FOSFacebookBundle and FOSUserBundle for Symfony 2.1

I like to start a project with the user accounts and for someone who's only just starting Symfony2, the security component's configuration magic can be daunting, racking up a lot of WTFpm (WTF's per minute).

This bundle might help out some people that are struggling with the set up of two of the most popular bundles by FriendsOfSymfony; FOSUserBundle and FOSFacebookBundle.

Probably the best way to use this code is to download this bundle and use it as a base for your own project. I haven't created it to work as a bundle within your own project, so hence no composer.json.

Installation

  1. Download this bundle and (optionally) rename it as your own. Eg /src/Acme/MyBundle and add to AppKernel. If you are renaming it as a base for your own project then you will need to search and replace the bundle name to your own.

  2. Add the provided User class to your database (use doctrine:migrations:diff or doctrine:schema:create)

  3. Add your Facebook App settings to your parameters.yml

     parameters: 
         # ...
         facebook_app_id:          1234567890
         facebook_app_secret:      1234567890abcdefghijk
    
  4. Import the bundle's config files in app/config/config.yml (if necessary replace @OhFOSFacebookUserBundle with your own bundle)

     imports:
         - { resource: parameters.yml }
         - { resource: security.yml }
         - { resource: services.yml }
         - { resource: @OhFOSFacebookUserBundle/Resources/config/config.yml }
         - { resource: @OhFOSFacebookUserBundle/Resources/config/services.yml }
         - { resource: @OhFOSFacebookUserBundle/Resources/config/security.yml }
    
  5. Do the same with your routing.yml

     OhEventstagramBundle:
         resource: "@OhFOSFacebookUserBundle/Resources/config/routing.yml"
         prefix:   /
    

This bundle also overwrites the registration form for the FOSUserBundle to include "firstname" and "surname" as a start for implementing your own User model.

Disclaimer

Nothing very clever happens with this bundle, I just followed the instructions from the FOSUserBundle and FOSFacebookBundle, put it into my own bundle to use as a base for new projects.

I'm not planning on maintaining this bundle, but maybe someone can pick it up and add some more connectors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.