PageRenderTime 26ms CodeModel.GetById 21ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1<div id="fb-root"></div>
 2{% if not async %}
 3<script type="text/javascript" src="http://connect.facebook.net/{{ culture }}/all.js"></script>
 4{% endif %}
 5<script type="text/javascript">
 6{% autoescape false %}
 7{% if async %}
 8window.fbAsyncInit = function() {
 9{% endif %}
10  FB.init({{ {'appId':appId, 'xfbml':xfbml, 'oauth':oauth, 'status':status, 'cookie':cookie, 'logging':logging, 'channelUrl':channelUrl}|json_encode }});
11{% if async %}
12  {{ fbAsyncInit }}
13};
14
15(function() {
16  var e = document.createElement('script');
17  e.src = document.location.protocol + {{ "//connect.facebook.net/%s/all.js"|format(culture)|json_encode }};
18  e.async = true;
19  document.getElementById('fb-root').appendChild(e);
20}());
21{% endif %}
22{% endautoescape %}
23</script>