Try*_*nJS 8 php twitter meta-tags twitter-card
所以我正在测试Twitter和Facebook共享功能.
我正在测试Twitter的分享按钮,我已添加到meta
标签中,经过几个小时的搜索后,我发现能够嵌入推文(将Twitter图像嵌入我的推文链接回我的网站)我需要推特卡.
我的元代码:
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="http://MY_IP_ADDRESS:3000/">
<meta name="twitter:creator" content="@random">
<meta name="twitter:title" content="Parade of Fans for Houston’s Funeral">
<meta name="twitter:description" content="NEWARK - The guest list and parade of limousines with celebrities emerging from them seemed more suited to a red carpet event in Hollywood or New York than than a gritty stretch of Sussex Avenue near the former site of the James M. Baxter Terrace public housing project here.">
<meta name="twitter:image" content="http://cdn0.lostateminor.com/wp-content/uploads/2015/10/Amazing-long-exposure-photos-make-light-look-like-cobwebs-on-trees2-650x434.jpg">
Run Code Online (Sandbox Code Playgroud)
然后是分享按钮,看起来像:
<img src="http://cdn0.lostateminor.com/wp-content/uploads/2015/10/Amazing-long-exposure-photos-make-light-look-like-cobwebs-on-trees2-650x434.jpg">
<a href="https://twitter.com/intent/tweet?button_hashtag=test" data-url="http://localhost.share.com/" target="_blank">Tweet #test</a>
</img>
Run Code Online (Sandbox Code Playgroud)
当我发推特哈希标签时,它不会选择我的图像或发推特.所以我一直在尝试运行我的网站(我正在Twitter的卡验证器上测试它在我的本地主机上)https://cards-dev.twitter.com/validator.
我做错了什么想法?或者为什么我不能使用我的IP
地址,所以我可以测试Twitter卡?
谢谢!
Try*_*nJS 10
我以为我会离开这里,任何人都会发现这件事.因为我很久以前就问过这个问题,我实际上不记得这个问题,但我认为最简单的解决方案就是使用ngork.
下载ngrok.在本地运行您的服务器然后将ngrok指向您运行本地服务器的端口,它将按照......的方式吐出一些东西.
Session Status online
Version 2.1.18
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://65hkdy7ed.ngrok.io -> localhost:3000
Forwarding https://65hkdy7ed.ngrok.io -> localhost:3000
Run Code Online (Sandbox Code Playgroud)
你有自己的URL使用:)
归档时间: |
|
查看次数: |
3346 次 |
最近记录: |