Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
# vim: set fileencoding=latin-1 :
# This file:
# http://angg.twu.net/fbcache/testids.py
# http://angg.twu.net/fbcache/testids.py.html
# (find-python-links "fbcache/" "testids.py")
# (find-angg-upload

# See:
#   http://stackoverflow.com/questions/26685170/fetching-facebook-api-objects-from-their-public-url
#   (find-angg "fbcache/urls.lua" "translations0")
#   (find-angg "fbcache/urls.lua" "testids")
#   (find-angg ".pythonrc.py")

# https://developers.facebook.com/tools/explorer
token = "CAACEdEose0cYtQPQZAYjjnlTNAjg52JrrKrcqkjrfsL6vCLqFHedqEjgSqDjUzZCZCHZCZClA25QlsyAsQOLHczU3xFhAGuywDGASAo4ZA4qyPS1Ya3NcgQM8ZCBrkKCtM9dUYpEtqVEeubJpbsQI1SBdiP8tb3Hcc2aYdYG0kVagM70yRx3xbcrJvvK9mLNkUPTrmXMXzEmxm1Ah2hb93bxi7I57s8ZD"

import facebook
graph = facebook.GraphAPI(token)
def ggo (query):
  return graph.get_object("/v2.1/%s" % (query))

def testid (id):
  try:    print id + ":", ggo(id).keys()
  except: print "fail"

print "This is a URL that we know how to handle..."
print "https://www.facebook.com/events/1433035430297888/permalink/1433056046962493/"
testid("1433035430297888")
testid("1433056046962493")

print "---"
print
print "Now some FB urls that we don't know how to extract IDs from them."
print

print "https://www.facebook.com/alexsander.lepletier/media_set?set=a.10151933894649198.1073741851.531549197"
testid(                               "531549197")
testid(                    "1073741851")
testid(                    "1073741851.531549197")
testid(                    "1073741851_531549197")
testid(  "10151933894649198")
testid(  "10151933894649198.1073741851")
testid(  "10151933894649198.1073741851.531549197")
testid(  "10151933894649198_1073741851")
testid(  "10151933894649198_1073741851_531549197")
testid("a.10151933894649198")
testid("a.10151933894649198.1073741851")
testid("a.10151933894649198.1073741851.531549197")
testid("a_10151933894649198")
testid("a_10151933894649198_1073741851")
testid("a_10151933894649198_1073741851_531549197")

print
print "https://www.facebook.com/media/set/?set=a.10202222226170686.1073741844.1040842293"
testid(                               "1040842293")
testid(                    "1073741844")
testid(                    "1073741844.1040842293")
testid(                    "1073741844_1040842293")
testid(  "10202222226170686")
testid(  "10202222226170686.1073741844")
testid(  "10202222226170686.1073741844.1040842293")
testid(  "10202222226170686_1073741844")
testid(  "10202222226170686_1073741844_1040842293")
testid("a.10202222226170686")
testid("a.10202222226170686.1073741844")
testid("a.10202222226170686.1073741844.1040842293")
testid("a_10202222226170686")
testid("a_10202222226170686_1073741844")
testid("a_10202222226170686_1073741844_1040842293")

print
print "https://www.facebook.com/photo.php?fbid=10151256245188625&set=t.100002233344951"
testid("10151256245188625")
testid("t.100002233344951")
testid("t_100002233344951")
testid(  "100002233344951")

print
print "https://www.facebook.com/photo.php?fbid=10151900172318321&set=a.10150633280098321.376945.508548320"
testid(                            "508548320")
testid(                    "376945")
testid(                    "376945.508548320")
testid(  "10150633280098321")
testid(  "10150633280098321.376945")
testid(  "10150633280098321.376945.508548320")
testid(  "10150633280098321_376945")
testid(  "10150633280098321_376945_508548320")
testid("a.10150633280098321")
testid("a.10150633280098321.376945")
testid("a.10150633280098321.376945.508548320")
testid("a_10150633280098321")
testid("a_10150633280098321_376945")
testid("a_10150633280098321_376945_508548320")


"""
# You are not expected to understand this

* (eepitch-python)
* (eepitch-kill)
* (eepitch-python)
execfile("testids.py", globals())

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
makeL1 fbcache/testids.py.html
makeR1 fbcache/testids.py.html
Scp-np fbcache/testids.py.html fbcache/testids.py $TWUP/fbcache/
"""


"""
#   ___        _               _   
#  / _ \ _   _| |_ _ __  _   _| |_ 
# | | | | | | | __| '_ \| | | | __|
# | |_| | |_| | |_| |_) | |_| | |_ 
#  \___/ \__,_|\__| .__/ \__,_|\__|
#                 |_|              

This is a URL that we know how to handle...
https://www.facebook.com/events/1433035430297888/permalink/1433056046962493/
1433035430297888: [u'description', u'privacy', u'start_time', u'venue', u'updated_time', u'is_date_only', u'location', u'owner', u'timezone', u'id', u'name']
1433056046962493: [u'from', u'comments', u'privacy', u'actions', u'updated_time', u'to', u'shares', u'created_time', u'message', u'type', u'id', u'likes']
---

Now some FB urls that we don't know how to extract IDs from them.

https://www.facebook.com/alexsander.lepletier/media_set?set=a.10151933894649198.1073741851.531549197
531549197: fail
1073741851: fail
1073741851.531549197: fail
1073741851_531549197: fail
10151933894649198: fail
10151933894649198.1073741851: fail
10151933894649198.1073741851.531549197: fail
10151933894649198_1073741851: fail
10151933894649198_1073741851_531549197: fail
a.10151933894649198: fail
a.10151933894649198.1073741851: fail
a.10151933894649198.1073741851.531549197: fail
a_10151933894649198: fail
a_10151933894649198_1073741851: fail
a_10151933894649198_1073741851_531549197: fail

https://www.facebook.com/media/set/?set=a.10202222226170686.1073741844.1040842293
1040842293: fail
1073741844: fail
1073741844.1040842293: fail
1073741844_1040842293: fail
10202222226170686: fail
10202222226170686.1073741844: fail
10202222226170686.1073741844.1040842293: fail
10202222226170686_1073741844: fail
10202222226170686_1073741844_1040842293: fail
a.10202222226170686: fail
a.10202222226170686.1073741844: fail
a.10202222226170686.1073741844.1040842293: fail
a_10202222226170686: fail
a_10202222226170686_1073741844: fail
a_10202222226170686_1073741844_1040842293: fail

https://www.facebook.com/photo.php?fbid=10151256245188625&set=t.100002233344951
10151256245188625: fail
t.100002233344951: fail
t_100002233344951: fail
100002233344951: fail

https://www.facebook.com/photo.php?fbid=10151900172318321&set=a.10150633280098321.376945.508548320
508548320: fail
376945: fail
376945.508548320: fail
10150633280098321: fail
10150633280098321.376945: fail
10150633280098321.376945.508548320: fail
10150633280098321_376945: fail
10150633280098321_376945_508548320: fail
a.10150633280098321: fail
a.10150633280098321.376945: fail
a.10150633280098321.376945.508548320: fail
a_10150633280098321: fail
a_10150633280098321_376945: fail
a_10150633280098321_376945_508548320: fail
"""



# Local Variables:
# coding: raw-text-unix
# End: