Issue #3 resolved

Cached facebook comments don't work

Anonymous created an issue

Facebook must have changed its format or something.

On this line: https://bitbucket.org/sirpengi/django-facebook-comments/src/732a5473c8b2/facebook_comments/models.py#cl-22 you are indexing into ['data'], but it should actually be indexing into ['comments']['data']

Here is an example JSON response from Facebook so you can see what I mean:

{{{ { u'comments': { u'paging': { u'next': u'https: //graph.facebook.com/10150921150216090/comments?value=1&limit=25&offset=25&__after_id=10150921150216090_22361121' }, u'data': [ { u'from': { u'name': u'KevinMcCarthy', u'id': u'13704096' }, u'like_count': 0, u'can_remove': False, u'created_time': u'2012-07-20T00: 33: 51+0000', u'message': u'aaaaaaaaaaaaaaaaa', u'id': u'10150921150216090_22361061', u'user_likes': False }, { u'from': { u'name': u'KevinMcCarthy', u'id': u'13704096' }, u'like_count': 0, u'can_remove': False, u'created_time': u'2012-07-20T00: 34: 12+0000', u'message': u'aaaaaaa2', u'id': u'10150921150216090_22361067', u'user_likes': False }, { u'from': { u'name': u'KevinMcCarthy', u'id': u'13704096' }, u'like_count': 0, u'can_remove': False, u'created_time': u'2012-07-20T00: 34: 43+0000', u'message': u'123', u'id': u'10150921150216090_22361073', u'user_likes': False }, { u'from': { u'name': u'KevinMcCarthy', u'id': u'13704096' }, u'like_count': 0, u'can_remove': False, u'created_time': u'2012-07-20T00: 35: 05+0000', u'message': u'456', u'id': u'10150921150216090_22361076', u'user_likes': False }, { u'from': { u'name': u'KevinMcCarthy', u'id': u'13704096' }, u'like_count': 0, u'can_remove': False, u'created_time': u'2012-07-20T00: 35: 50+0000', u'message': u'aaaaa', u'id': u'10150921150216090_22361085', u'user_likes': False }, { u'from': { u'name': u'KevinMcCarthy', u'id': u'13704096' }, u'like_count': 0, u'can_remove': False, u'created_time': u'2012-07-20T00: 36: 30+0000', u'message': u'aaaaaaaaaa2', u'id': u'10150921150216090_22361094', u'user_likes': False }, { u'from': { u'name': u'KevinMcCarthy', u'id': u'13704096' }, u'like_count': 0, u'can_remove': False, u'created_time': u'2012-07-20T00: 37: 38+0000', u'message': u'11111111', u'id': u'10150921150216090_22361105', u'user_likes': False }, { u'from': { u'name': u'KevinMcCarthy', u'id': u'13704096' }, u'like_count': 0, u'can_remove': False, u'created_time': u'2012-07-20T00: 39: 49+0000', u'message': u'aaaaaaa', u'id': u'10150921150216090_22361121', u'user_likes': False } ] } } }}}

Comments (3)

  1. Log in to comment