Skip to content

Instantly share code, notes, and snippets.

@averyaube
Created July 12, 2012 18:55
Show Gist options
  • Save averyaube/3100128 to your computer and use it in GitHub Desktop.
Save averyaube/3100128 to your computer and use it in GitHub Desktop.
Growl Notifier for Facebook Likes
import gntp.notifier
import requests
import json
import time
likes = 0
HARTH_URL = "http://graph.facebook.com/harthrecords"
if __name__ == '__main__':
while True:
try:
r = requests.get(HARTH_URL).json
if r['likes'] != likes:
likes = r['likes']
print str(likes) + " likes!!!"
gntp.notifier.mini(str(likes) + " likes!!!", title="Harth Records Likes", applicationName="Harth Records", notificationIcon="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/373731_175116679184257_1836758117_n.jpg")
except:
print "oops"
time.sleep(60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment