examples/flask/app/templates/base.html
<!DOCTYPE html>
<html xmlns:fb="http://ogp.me/ns/fb#" lang="en">
<head>
<!-- Meta content -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Example Facebook app using Flask and Python Facebook SDK">
<meta name="author" content="github.com/mylsb">
<!-- These are Open Graph tags.-->
<meta property="fb:app_id" content="{{ app_id }}" />
<title>{{ app_name }}</title>
<!-- Style -->
<link rel="stylesheet" type="text/css" href="/static/css/style.css">
<!--[if IE]>
<script type="text/javascript">
var tags = ['header', 'section'];
while(tags.length)
document.createElement(tags.pop());
</script>
<![endif]-->
</head>
<body>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : '{{ app_id }}',
status : true,
cookie : true,
version : 'v2.11',
xfbml : true
});
FB.Event.subscribe('auth.login', function(response) {
window.location = window.location;
});
};
// Load the SDK Asynchronously
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="container">
{% block content %} {% endblock %}
</div>
</body>
</html>