GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Python/get_likes_on_FB.py at master · CHAOYUHONG/Python Expand file tree/ Copy pathget_likes_on_FB.pyMore file actions 36 lines (26 loc) · 820 Bytes / Copy pathget_likes_on_FB.pyFile metadata and controls36 lines (26 loc) · 820 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 from __future__ import print_function import urllib import json import sys import os accessToken = 'TOKENVALUE' # YOUR ACCESS TOKEN GETS INSERTED HERE userId = sys.argv[1] #USERID limit=100 url='https://graph.facebook.com/'+userId+'/posts?access_token='+accessToken +'&limit='+str(limit) #FB Link data = json.load(urllib.urlopen(url)) id=0 print(str(id)) for item in data['data']: time=item['created_time'][11:19] date=item['created_time'][5:10] year=item['created_time'][0:4] if 'shares' in item: num_share=item['shares']['count'] else: num_share=0 if 'likes' in item: num_like=item['likes']['count'] else: num_like=0 id+=1 print(str(id)+'\t'+ time.encode('utf-8')+'\t'+date.encode('utf-8')+'\t'+year.encode('utf-8')+'\t'+ str(num_share)+'\t'+str(num_like)) |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |