Commit 2663a7c056cbf33386d15150e27625ce9b60e4e6
1 parent
dc194d76b3
Exists in
master
facebook accesstoken 변경
Showing 3 changed files with 4 additions and 3 deletions Side-by-side Diff
insight/pageinsight.py
View file @
2663a7c
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | |
26 | 26 | for i in item: |
27 | 27 | time.sleep(0.5) |
28 | - url = 'https://graph.facebook.com/v2.5/%s/insights/%s?debug=all&method=get&pretty=0&suppress_http_code=1&since=%d&until=%d%s' \ | |
28 | + url = 'https://graph.facebook.com/v2.6/%s/insights/%s?debug=all&method=get&pretty=0&suppress_http_code=1&since=%d&until=%d%s' \ | |
29 | 29 | % (page_id, i, int(time.time()), int(time.time()) + 12 * 60 * 60, self.token) |
30 | 30 | txt = requests.get(url).text |
31 | 31 | self.data = json.loads(txt) |
insight/postinsight.py
View file @
2663a7c
... | ... | @@ -24,7 +24,8 @@ |
24 | 24 | def setContentInsight(self,content_id): |
25 | 25 | |
26 | 26 | try: |
27 | - url ='https://graph.facebook.com/v2.5/%s?fields=message,created_time,link,comments.limit(5),type,insights{values}'%content_id | |
27 | + url ='https://graph.facebook.com/v2.6/%s?fields=message,created_time,link,comments.limit(5),type,insights{values}'%content_id | |
28 | + print url + self.token | |
28 | 29 | txt = requests.get(url + self.token).text |
29 | 30 | #print url + self.token |
30 | 31 | self.data = json.loads(txt) |
insight/token.py
View file @
2663a7c
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | # -*- coding: utf-8 -*- |
3 | 3 | class Token() : |
4 | 4 | |
5 | - token_str = "EAAUTLd5JgaoBAMqBqgY12S47RH1m9OTp68Jl1CNXNFWmbAMZAbrjp9QzSQB3jQrxfSlYef4qZAOyrqJA3edEv7wRUKT1GJ6hZA7I2pu6vhkH3yfevnlZASIyzAlJql95pk5UZC5DaNDGZArGREEJoHnRZBwGTkveEEZD" | |
5 | + token_str = "EAAUTLd5JgaoBAJv0JipsbUair0ZCKSynVZAQg9XOAQpkqxbT2eoaZBirOZCm2IDRf7hI9p21c0HWAuVBIxpUEF6MV8Y940xbm61Do0faEbqZB7jmhAId3ZCAPBC1mo7XGNnKMiLblgPYop0ErTJFSB3srArB9uFZAROtEU8tH5F4gZDZD" | |
6 | 6 | prefix = "&access_token=" |
7 | 7 | token = "" |
8 | 8 | token_sub = "" |