{% extends 'base.html' %}

{% block facebook_code %}
  FB.getLoginStatus(function(response) {
    var update = $('#getLoginStatus')
    if (response.session) {
      update.text('response.session.uid = ' + response.session.uid)
    } else {
      update.text('response.session = null')     
    }
  });
{% endblock %}


{% block content %}
<table>
  <tr><td>request.user</td><td>{{ request.user }}</td></tr>
  <tr><td>request.facebook.uid</td><td>{{ request.facebook.uid }}</td></tr>
  <tr><td>request.facebook.user</td><td>{{ request.facebook.user }}</td></tr>
  <tr><td>request.COOKIES</td><td><pre>{{ request.COOKIES|pprint }}</pre></td></tr>
  <tr><td>request.POST</td><td><pre>{{ request.POST|pprint }}</pre></td></tr>
  <tr><td>FB.getLoginStatus</td><td><span id="getLoginStatus">Loading ...</span></td></tr>
</table>

<fb:login-button autologoutlink="true"></fb:login-button>

{% endblock %}
