def is_json(content):
 try:
  json.loads(content)
  is_json = True
 except:
  is_json = False
 return is_json

def is_json ( content ) : try : json . loads ( content ) is_json = True except : is_json = False return is_json
unfortunately facebook returns 500s which mean they are down or 500s with a nice error message because you use open graph wrong so we have to figure out which is which :) .