I've just configured fandjango with my simply django application.
Here's the files:
VIEWS.PY
from django.http import HttpResponse
from django.shortcuts import render
from fandjango.decorators import facebook_authorization_required
@facebook_authorization_required()
def home(request):
return render(request, 'home.html', {'facebook_user': request.facebook.user})
HOME.HTML
{% if facebook_user.first_name %}
You are:<br>
{{ facebook_user.first_name }} {{ facebook_user.last_name }}.
<br>ID: {{ facebook_user.facebook_id }}
<br>YOUR URL: {{ facebook_user.profile_url }}
<br><img src="http://graph.facebook.com/{{ facebook_user.facebook_id }}/picture?type=large">
{% else %}There's a problem here.{% endif %}
Now, when I go to http://apps.facebook.org/myapplicationname and I allow the access for application to take account's infos, I see the home.html.
BUT (here's the BIG problem) sometimes I see all my infos (if condition is true) but sometimes I don't see my info and I see "There's a problem here". In the database the data is ok.
I've checked this with others account and there's still this mysterious problem.