Question

After integrating the FOSfacebookBundle in my Symfony2 project, I get this error when trying to execute my project:

An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "fos_facebook_channel" as such route does not exist.") in MyBundle::layout.html.twig at line 32. 

This is the line 32:

{{ facebook_initialize({'xfbml': true, 'fbAsyncInit': 'onFbInit();'}) }}

I just checked if the fos_facebook_channel does have a route in the file FOS/FacebookBundle/Resources/config/routing.xml and it does:

<route id="fos_facebook_channel" pattern="/channel.html">
    <default key="_controller">FOSFacebookBundle:Facebook:channel</default>
    <requirement key="_method">GET</requirement>
</route>
Was it helpful?

Solution

Try to add

fos_facebook_channel: resource: "@FOSFacebookBundle/Resources/config/routing.xml"

to your app\config\routing.yml file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top