How does Facebook detect images when adding a link?

前端 未结 3 984
甜味超标
甜味超标 2021-01-14 14:28

When you add a link to your Facebook page, after some processing, Facebook presents you a next/prev button to choose an image linked to the url your are inserting.

O

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-14 14:58

    I am not familiar with the way Facebook did it, but I can tell you how I would do it.

    1. Establish web request to desired url
    2. Parse resulted web response with regular expression, that looks for

提交回复
热议问题