문제

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>
도움이 되었습니까?

해결책

Try to add

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

to your app\config\routing.yml file.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top