Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -241,7 +241,10 @@ 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(
|
|
|
|
|
|
|
245 |
if post_details.get("updated_time"):
|
246 |
date = post_details.get("updated_time")
|
247 |
else:
|
|
|
241 |
if not post_id:
|
242 |
post_id = url.split("/")[-1]
|
243 |
try:
|
244 |
+
post_details = requests.get(
|
245 |
+
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}",
|
246 |
+
headers={"user-agent": "Googlebot",}
|
247 |
+
).json()
|
248 |
if post_details.get("updated_time"):
|
249 |
date = post_details.get("updated_time")
|
250 |
else:
|