我刚刚配置了我的简单django应用程序fandjango。Fandjango的神秘问题
这里的文件:
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 %}
现在,当我去http://apps.facebook.org/myapplicationname,我允许应用程序的访问考虑到帐户的信息,我看到了home.html。
但是(这里是BIG问题)有时我会看到我的所有信息(如果条件为真),但有时我没有看到我的信息,而我看到“这里有问题”。在数据库中数据是可以的。
我已经检查了这个与他人帐户,仍然存在这个神秘的问题。