FriendsOfSymfony / FOSFacebookBundle

NOT MAINTAINED - see https://github.com/hwi/HWIOAuthBundle
322 stars 140 forks source link

problem with FOSFacebookBundle #288

Open wilfried2006 opened 10 years ago

wilfried2006 commented 10 years ago

I get this error when i try to integrate fosfacebookbundle with fosuserbundle.

ContextErrorException: Catchable Fatal Error: Argument 2 passed to FOS\FacebookBundle\Security\Authentication\Provider\FacebookProvider::__construct() must be an instance of BaseFacebook, instance of FOS\UserBundle\Doctrine\UserManager given, called in /var/www/binbout/app/cache/dev/appDevDebugProjectContainer.php on line 1927 and defined in /var/www/binbout/vendor/friendsofsymfony/facebook-bundle/FOS/FacebookBundle/Security/Authentication/Provider/FacebookProvider.php line 38

My FacebookProvider class

  public function __construct(BaseFacebook $facebook, $userManager, $validator)
  {
     $this->facebook = $facebook;
     $this->userManager = $userManager;
     $this->validator = $validator;
    }

My service declaration in config/config.yml:

      services:
          my_user.facebook_provider:
            class:  Data\EntityBundle\Security\FacebookProvider
              arguments:
               facebook: "@fos_facebook.api"
               userManager: "@fos_user.user_manager"
               validator: "@validator"
                container: "@service_container"