jonathanjordan21 commited on
Commit
afade17
·
verified ·
1 Parent(s): c494fec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -241,11 +241,11 @@ async def fb_post_detail(username: Optional[str] = None, post_id: Optional[str]
241
  if not post_id:
242
  post_id = url.split("/")[-1]
243
  try:
244
- post_details = requests.get(f"https://graph.facebook.com/v20.0/1066512588151225_{post_id}?fields=place,shares,targeting,updated_time,created_time,description,child_attachments,caption,event,message,message_tags,story,status_type,source,coordinates,backdated_time,story_tags,scheduled_publish_time,properties,attachments&access_token={api_access_key}").json()
245
- if post_details.get("updated_date"):
246
- date = post_details.get("updated_date")
247
  else:
248
- date = post_details.get("created_date")
249
 
250
  except Exception as e:
251
  print(e)
 
241
  if not post_id:
242
  post_id = url.split("/")[-1]
243
  try:
244
+ post_details = requests.get(f"https://www.graph.facebook.com/v20.0/1066512588151225_{post_id}?fields=place,shares,targeting,updated_time,created_time,description,child_attachments,caption,event,message,message_tags,story,status_type,source,coordinates,backdated_time,story_tags,scheduled_publish_time,properties,attachments&access_token={api_access_key}").json()
245
+ if post_details.get("updated_time"):
246
+ date = post_details.get("updated_time")
247
  else:
248
+ date = post_details.get("created_time")
249
 
250
  except Exception as e:
251
  print(e)