Facebook Like Button doesn't show og metadata until after first like

那年仲夏 提交于 2019-12-04 14:07:54

It seems like once Facebook caches the information, things are good.

Yes, of course – this is how it works.

When Facebook encounters a “new” URL, it sets its scraper on it to get the information from it. But in cases where this is triggered by the end user (like button, feed dialog, etc.), it may take “too long” for Facebook to get the info – and so they don’t have the UI wait for it, because they want a fast user experience.


What you can do about this (apart from making your server respond faster, should(!) it be the bottleneck in this [1]), is to programmatically ask Facebook via API to scrape your pages – ideally at the point where you add new content to your site, but you can also do it for pages that exist for a while already, but might not have been scraped yet.

How that’s done, is described here: Updating Objects. (If you plan to do this in larger quantities, from what I’ve heard it should be advisable to include an app access token with those calls, to avoid throttling.)


[1] If your server is the bottleneck because you are delivering large pages, you could also consider delivering the meta data for your pages under different URLs, so that the scraper has much less content to read from your server and maybe your server has less content to create in the first place – for that, see the same linked document, section “Handling Large Objects With Pointers”

Ok so if after all that, you’re problem is still not solved then try turning off Gzip Page Compression. In my case I was using the W3 Cache plugin for WordPress that was compressing the pages with Gzip and effectively removing the tags.

If the solution provided by the best answer doesn't work for you, try this http://peterfields.me/facebook-share-ogtitle-string-error/

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