facebook graph api的json格式无效

时间:2014-07-11 21:32:16

标签: json facebook facebook-graph-api urllib2 simplejson

当我尝试https://graph.facebook.com/act_adaccountid/customaudiences?fields=时,我正在使用图形API来获取广告受众群体信息

但是当我通过一个程序尝试它时,我得到了无效的json格式


      from urlib2 import urlopen
      from simplejson import loads
      x = loads(urlopen('https://graph.facebook.com/act_adaccountid/customaudiences?fields=<comma_separate_list_of_fields?access_token='XXXXXXXXXX').read())

输出:


     {'paging': {'cursors': {'after': 'NjAxMDE5ODE5NjgxMw==', 'before': 'NjAxNTAzNDkwOTAxMw=='}}, 'data': [{'account_id': 1377346239145180L, 'id': '6015034909013'}, {'account_id': 1377346239145180L, 'id': '6015034901213'}, {'account_id': 1377346239145180L, 'id': '6015034901013'}, {'account_id': 1377346239145180L, 'id': '6015034900413'}

{'data':[]}

预期产量: http://pastebin.com/5265tJ8w

0 个答案:

没有答案