donatj/PhpUserAgent

Link Preview user agent - such as in iMessage or Telegram?

yosun opened this issue · 3 comments

yosun commented

Curious if this can be used to definitively know if it's a Link Preview user agent - such as in iMessage or Telegram? (Useful for making sure the graphlink image is sized appropriately etc)

iMessages claims to be both Twitterbot and Facebot. As a general rule of thumb, I try to avoid complex sniffing of things that don't want to be sniffed.

https://medium.com/@siggi/apples-imessage-impersonates-twitter-facebook-bots-when-scraping-cef85b2cbb7d

TelegramBot however I should be able to do. Let me look into that a little.

Ok, so with a little more research, Facebook's bot never actually goes by Facebot, so that makes the sniffing really easy.

This should be resolved in v1.4.0 - thank you for your issue.

https://github.com/donatj/PhpUserAgent/releases/tag/v1.4.0