Why does FB sharer use only the OG meta tag details on the home page?

徘徊边缘 提交于 2019-12-12 02:15:54

问题


I have a project, coded on codeigniter, which is basically a collection of posts by different users. While adding the fb share button and clicking on it, The image, title and description content is taken from the header of the home page and not of the page(view) where the share button is placed?


回答1:


As mentioned here, The issue was that only those users could view the page who are signed in, and therefore even fb wasn't able to scrape the info from there.

EDIT: Whats important here is how FB scrapes the info. Apparantly the link you provide inside data-href if parsed by FB and they capture the og meta tags from the header on that page. However if you restrict those pages to logged in users, FB is also unable to parse the page and thus it reverts to the base URL's meta tags.



来源:https://stackoverflow.com/questions/35653227/why-does-fb-sharer-use-only-the-og-meta-tag-details-on-the-home-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!