最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to test sharing social media link preview on local environment? - Stack Overflow

programmeradmin1浏览0评论

I want to set social media share options with preview, but it doesn't work for me on my local environment. The meta tags are present in the link that i'm sharing but because the site is in development stage the social media platforms can't reach it, and the preview doesn't show.

Is there a way to test the preview before deployment to production?

I want to set social media share options with preview, but it doesn't work for me on my local environment. The meta tags are present in the link that i'm sharing but because the site is in development stage the social media platforms can't reach it, and the preview doesn't show.

Is there a way to test the preview before deployment to production?

Share Improve this question asked Nov 7, 2019 at 12:30 Alex LipnikAlex Lipnik 1831 gold badge1 silver badge5 bronze badges 3
  • As far as I'm aware, tools like developers.facebook.com/tools/debug/sharing and cards-dev.twitter.com/validator require a public URL somewhere. Why not generate the HTML and host it statically, for testing purposes? – jonrsharpe Commented Nov 7, 2019 at 12:33
  • We don't want to change the production version, and our staging version requires authorization and has the same problem as the local version. we don't want to deploy another version just for that if possible. – Alex Lipnik Commented Nov 7, 2019 at 13:07
  • You don't have to "deploy another version", just one HTML page somewhere to test the basic template. – jonrsharpe Commented Nov 7, 2019 at 13:08
Add a comment  | 

1 Answer 1

Reset to default 20

You can use a google chrome extension to test your page previews from a local environment.

It is called Social Share Preview

https://chrome.google.com/webstore/detail/social-share-preview/ggnikicjfklimmffbkhknndafpdlabib/related?hl=en

发布评论

评论列表(0)

  1. 暂无评论