Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8039713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:39:46+00:00 2026-06-05T03:39:46+00:00

I’m trying to get both bundles working together so that a new user is

  • 0

I’m trying to get both bundles working together so that a new user is created and logged in whenever a facebook login occurs with the provided facebook login button.

I’ve tries a lot of things based on other questions here on stack overflow but I still can’t get it to work. Here’s my code (I’ve put some of the things i’ve tried in comments; I basically tried each possible combination with those):

Config.yml

fos_facebook:
  file:   %kernel.root_dir%/../vendor/facebook/src/base_facebook.php
  alias:  facebook
  app_id: FOO
  secret: BAR
  cookie: true
  permissions: [email, user_birthday]

fos_user:
    db_driver: orm
    firewall_name: public
    user_class: Not\NotBundle\Entity\User

Routing.yml

# fos_user_security:
#     resource: "@FOSUserBundle/Resources/config/routing/security.xml"

_security_check:
    pattern:  /login_check

_security_logout:
    pattern:  /logout

Security.yml

security:
factories:
    - "%kernel.root_dir%/../vendor/bundles/FOS/FacebookBundle/Resources/config/security_factories.xml"

role_hierarchy:
    ROLE_ADMIN:       ROLE_USER
    ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]

providers:
    # chain_provider:
    #     providers: [fos_userbundle, my_fos_facebook_provider]
    # fos_userbundle:
    #     id: fos_user.user_manager
    my_fos_facebook_provider:
        id: my.facebook.user

encoders:
    "FOS\UserBundle\Model\UserInterface": sha512

firewalls:
    dev:
        pattern:  ^/(_(profiler|wdt)|css|images|js)/
        security: false
    public:
        pattern:   ^/.*
        fos_facebook:
            app_url: "http://apps.facebook.com/FOO/"
            server_url: "http://not.not/facebookApp/"
            login_path: ^/login$
            check_path: ^/login_check$
            default_target_path: /
            provider: my_fos_facebook_provider
        # form_login:
        #     login_path: /login
        #     check_path: /login_check
        #     provider: fos_userbundle
        anonymous: true
        logout:
            handlers: ["fos_facebook.logout_handler"]

Services.yml

parameters:
    #my_facebook_user.class: Not\NotBundle\Security\User\Provider\FacebookProvider

services:
    my.facebook.user:
        class: Not\NotBundle\Security\User\Provider\FacebookProvider
        arguments:
            facebook: "@fos_facebook.api"
            userManager: "@fos_user.user_manager"
            # userManager: "@my.facebook.user" # <-- Tried this as well but gives: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in /Foo/vendor/symfony/src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php  
            validator: "@validator"
            container: "@service_container"

Basically this configuration is closest to the FOSFacebookBundle docs. At the moment I’m getting the error:

Unable to find the controller for path “/login_check”. Maybe you forgot to add the matching route in your routing configuration?

Any help would be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:39:48+00:00Added an answer on June 5, 2026 at 3:39 am

    Changing the check path and login path to routes solved my problem:

    security.yml

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false
        public:
            pattern:   ^/.*
            fos_facebook:
                app_url: "http://apps.facebook.com/Foo/"
                server_url: "http://localhost/facebookApp/"
                login_path: NotNotBundle_homepage
                check_path: _security_check
                default_target_path: /
            anonymous: true
            logout:
                handlers: ["fos_facebook.logout_handler"]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.