Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View facebook_ids_from_email.py
1 2 3 4 5 6 7 8 9 10 11 12 13
import email, json, urllib2
 
msg = email.message_from_file(open('facebook.eml'))
 
fb_notifiy = [tuple(t.strip().split("=")) for t in msg.get('X-Facebook-Notify').split(";")]
 
# example fb_notify
# [('event_wall',), ('eid', '14102494623'), ('from', '21602578'), ('mailid', '12bf28cG149a112G63016bG21')]
 
from_identity = json.load(urllib2.urlopen("http://graph.facebook.com/%s" % fb_notify[2][1]))
 
# example from_identity
# {u'first_name': u'Bryan', u'last_name': u'Clark', u'id': u'21602578', u'name': u'Bryan Clark'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.