/Resources/views/initialize.html.twig
http://github.com/FriendsOfSymfony/FOSFacebookBundle · Twig Template · 23 lines · 22 code · 1 blank · 0 comment · 3 complexity · 37bc1c266c5564e82f028dc01e3f25b9 MD5 · raw file
- <div id="fb-root"></div>
- {% if not async %}
- <script type="text/javascript" src="http://connect.facebook.net/{{ culture }}/all.js"></script>
- {% endif %}
- <script type="text/javascript">
- {% autoescape false %}
- {% if async %}
- window.fbAsyncInit = function() {
- {% endif %}
- FB.init({{ {'appId':appId, 'xfbml':xfbml, 'oauth':oauth, 'status':status, 'cookie':cookie, 'logging':logging, 'channelUrl':channelUrl}|json_encode }});
- {% if async %}
- {{ fbAsyncInit }}
- };
- (function() {
- var e = document.createElement('script');
- e.src = document.location.protocol + {{ "//connect.facebook.net/%s/all.js"|format(culture)|json_encode }};
- e.async = true;
- document.getElementById('fb-root').appendChild(e);
- }());
- {% endif %}
- {% endautoescape %}
- </script>