Exemple #1
0
 def test_graph_fql(self):
     from django_facebook.api import get_app_access_token
     token = get_app_access_token()
     facebook = get_facebook_graph(access_token=token, persistent_token=False)
     query = 'SELECT name FROM user WHERE uid = me()'
     result = facebook.fql(query)
     assert result == []
Exemple #2
0
 def test_photo_put(self):
     from django_facebook.api import get_app_access_token
     token = get_app_access_token()
     graph = get_facebook_graph(access_token=token, persistent_token=False)
     tags = simplejson.dumps([{'x':50, 'y':50, 'tag_uid':12345}, {'x':10, 'y':60, 'tag_text':'a turtle'}])
     try:
         graph.put_photo('img.jpg', 'Look at this cool photo!', None, tags=tags)
     except GraphAPIError, e:
         assert 'An active access token must be used to query information' in unicode(e)