【问题标题】:Facebook Like button posts my webhost thumbnail and URL on timelineFacebook Like 按钮在时间轴上发布我的虚拟主机缩略图和 URL
【发布时间】:2018-03-15 17:32:26
【问题描述】:
所以,我通过 facebook 调试器运行了我的 url,一切正常。如果我在状态中发布我的网址,则会出现正确的缩略图和描述。但是,我网站上的“点赞”按钮会导致我的虚拟主机网址和缩略图显示在 facebook 上。
我的网址是 adammoritzmusic.com
我的iframe 代码:
<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fadammoritzmusic.com&width=200&height=35&colorscheme=dark&layout=standard&action=like&show_faces=false&send=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:35px;" allowTransparency="true"></iframe>
帮助?
【问题讨论】:
标签:
facebook
facebook-like
【解决方案1】:
有 3 个您可以遵循的解决方案:
#1
使用http://adammoritzmusic.com/Home.html(不带https),因为当你adammoritzmusic.com Facebook 将使用你的index.html 重定向到Home.html
(Facebook Like 按钮有一个错误,同一个域有两种不同的点赞数,一个是http,另一个是https)
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fadammoritzmusic.com/Home.html&width=200&height=35&colorscheme=dark&layout=standard&action=like&show_faces=false&send=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:35px;" allowTransparency="true"></iframe>
#2
使用Index.html 代替home.html 或仅使用.htaccess 文件将home.html 作为您的默认索引文件:
DirectoryIndex Home.html
#3
创建一个 Facebook 粉丝页面,这是最快最简单的解决方案。