Tornado Framework (FacebookGraphMixin)

前端 未结 2 628
-上瘾入骨i
-上瘾入骨i 2021-01-20 04:09

I wanted to try sending App request from my Facebook app to a user using Tornado Framework. I was following http://www.tornadoweb.org/documentation/auth.html but I have no i

相关标签:
2条回答
  • 2021-01-20 04:18

    Looks like you forgot to subclass tornado.web.RequestHandler. Change:

    class Send(tornado.auth.FacebookGraphMixin):
    

    To:

    class Send(tornado.web.RequestHandler, tornado.auth.FacebookGraphMixin):
    
    0 讨论(0)
  • 2021-01-20 04:38

    Okay, my answer does not directly answer the OP's question. But as this shows up in the top search results for the error AttributeError: 'XxxxxHandler' object has no attribute 'async_callback'

    It is worth noting that starting Tornado v4.0 the async_callback function has been removed. To quote the Backwards-compatibility notes:

    The RequestHandler.async_callback and WebSocketHandler.async_callback wrapper functions have been removed; they have been obsolete for a long time due to stack contexts (and more recently coroutines).

    0 讨论(0)
提交回复
热议问题