How to recognize Facebook User-Agent

后端 未结 11 1392
隐瞒了意图╮
隐瞒了意图╮ 2020-11-27 15:35

When sharing one of my pages on FB, I want to display something different. Problem is, I prefer not to use the og: elements, but to recognize FB user-agent.

What is

11条回答
  •  天命终不由人
    2020-11-27 15:59

    In the perspective of user-agent modifications on FB side, it is maybe safer to use a regex like that :

    
    

    You can find more information about Facebook crawler on their doc: https://developers.facebook.com/docs/sharing/webmasters/crawler

提交回复
热议问题