In other words, I have different bundles for each of my fb apps and want to load app_id and app secret depending on the bundle being used.
I am also using FOSFacebook Bundle
My config.yml:
parameters:
# facebook
my_app_id: test
my_app_secret: test
fos_facebook:
file: %kernel.root_dir%/../vendor/facebook/src/base_facebook.php
alias: facebook
app_id: %my_app_id%
secret: %my_app_secret%
cookie: true
Trying to do:
$this->container->setParameter("my_app_id", "99999999999");
gives me the "Impossible to call set() on a frozen ParameterBag." error.
And this: http://groups.google.com/group/symfony2/browse_thread/thread/6f09df702f656874 says that I have to explicitly getParameter first for it to work or use yet another bundle.
So question is, what is the relatively simple and less time consuming way to do this?