sns-sdks / python-facebook

A simple Python wrapper for facebook graph api :sparkles: :cake: :sparkles: .
https://sns-sdks.github.io/python-facebook/
328 stars 86 forks source link

Post Class repr throws error with image-only posts #205

Closed jsradford closed 2 years ago

jsradford commented 2 years ago

This took a while to debug, but when you try to get a post from a user without any text (i.e. someone just posts an image without any text) line 131 in models/post.py: message = f"{self.message[:30]}..." throws an error.

You can fix it by having it just print out the ids or checking to see if message is empty before trying to slice it

MerleLiuKun commented 2 years ago

oh, this is bug.

Thanks for you, I will fix it quickly,:)