2012-09-03 5 views
2

다음 설치를 사용하여 먼저 사용자를 인증 한 후 인증 정보를 사용하여 다음 요청을 처리합니다. 이것은 대부분 (현재 응용 프로그램 작업 잘 내 링크)하지만 응용 프로그램을 승인하지 않은 새 사용자 (작동지정한 URL은 응용 프로그램에서 소유하지 않습니다.

urlpatterns = patterns('', 
    url(r'^$', 'crosswords.ugly.views.authenticate'), 
    url(r'^home/$', Home.as_view(), name='home'), 

: urls.py에서 views.py

@canvas_only 
def authenticate(request): 
    request.session['access_token'] = request.facebook.graph.access_token 
    return render(request, 'authenticated.html', {}) 

class Home(View): 

    def get(self, request, *args, **kwargs): 
     """The home to be called from within the application""" 

     access_token = request.session['access_token'] 
     graph = facebook.GraphAPI(access_token) 
     me = graph.get_object('me') 
     request.session['my_id'] = me['id'] 
     template_data = _collect_home_data(graph) 

     return render(request, 'home.html', template_data) 

에서

) 다음 오류 메시지가 나타납니다.

크로스 워드에 오류가 발생했습니다. 나중에 다시 시도 해주십시오.

API Error Code: 191 
API Error Description: The specified URL is not owned by the application 
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration. 

페이스 북의 응용 프로그램 설정 (캔버스 URL, 안전한 캔버스 URL)

HTTP (S)의 매력 포인트 : //finebitstrings.pythonanywhere.com/

무엇을 할 수 나는 그 오류를 제거해야합니까?

+0

[Facebook에서 오류 191이 가능하지만 URL이 제대로 설정되었습니다] (http://stackoverflow.com/questions/12249930/error-191-on-facebook-but-url-is-set-up- 정확히) – Raptor

답변

관련 문제