【问题标题】:class="fa fa-facebook share function not working [closed]class="fa fa-facebook 分享功能不工作 [关闭]
【发布时间】:2017-05-07 13:29:52
【问题描述】:

目前在我的网站上,当用户单击分享图标在他们自己的 Facebook 个人资料上分享产品时,没有任何反应。

当用户点击 Twitter 的分享图标时,他们可以分享一条关于产品的预先写好的推文。

我不确定为什么 facebook 图标无法正常工作。我正在使用非常旧版本的 wordpress 主题 Bridge。

谢谢你,

这是在http://www.frankmurphyfashions.com/product/reversible-tote-charges-phone/ 上,但我们所有的产品都在发生这种情况。

【问题讨论】:

  • 将相关代码添加到问题中,而不是指向您网站的链接。
  • 几分钟前当您看到 Stack Overflow Tour 时,我们希望您注意其内容。这将教会您如何提出问题,不仅可以为您提供所需的帮助,还可以帮助 我们 和未来的访客。这不是个人帮助台。干杯。

标签: javascript html wordpress woocommerce


【解决方案1】:

问题是您的链接中有换行符(在window.open('

不会工作:

<a title="Share on Facebook" href="#" onclick="window.open('http://www.facebook.com/sharer.php?s=100&amp;p[title]=Reversible Tote that Charges your Phone&amp;p[summary]=These totes are a 4-in-1 gift item!  The tote is reversible so it can be worn two different ways.  On the inside, is a wristlet that can be removed and worn on it\'s own.  Inside of that is a battery pack that can be removed and used in ALL your purses!  It\'s a strong battery pack that will recharge your phone a couple times before it needs to be charged.  To charge the battery pack, it\'s a USB device so it\'s very simple!  The pack comes with adapters for both the standard android and iphone plug ins, so if you have the android phone and the current ipad, it will actually work for both!

&nbsp;

Fabric Content: Vegan Leather&amp;p[url]=http%3A%2F%2Fwww.frankmurphyfashions.com%2Fproduct%2Freversible-tote-charges-phone%2F&amp;&p[images][0]=http://www.frankmurphyfashions.com/wp-content/uploads/2016/12/handbag-butler-reversible-tote-black-tan-5.jpg', 'sharer', 'toolbar=0,status=0,width=620,height=280');">Click to share</a>

会起作用

&lt;a title="Share on Facebook" href="#" onclick="window.open('http://www.facebook.com/sharer.php?s=100&amp;amp;p[title]=Reversible Tote that Charges your Phone&amp;amp;p[summary]=These totes are a 4-in-1 gift item!  The tote is reversible so it can be worn two different ways.  On the inside, is a wristlet that can be removed and worn on it\'s own.  Inside of that is a battery pack that can be removed and used in ALL your purses!  It\'s a strong battery pack that will recharge your phone a couple times before it needs to be charged.  To charge the battery pack, it\'s a USB device so it\'s very simple!  The pack comes with adapters for both the standard android and iphone plug ins, so if you have the android phone and the current ipad, it will actually work for both!Fabric Content: Vegan Leather&amp;amp;p[url]=http%3A%2F%2Fwww.frankmurphyfashions.com%2Fproduct%2Freversible-tote-charges-phone%2F&amp;amp;&amp;p[images][0]=http://www.frankmurphyfashions.com/wp-content/uploads/2016/12/handbag-butler-reversible-tote-black-tan-5.jpg', 'sharer', 'toolbar=0,status=0,width=620,height=280');"&gt;Click to share&lt;/a&gt;

请注意,特别是 sn-p 在 stackoverflow 中不起作用,因为它被阻塞了。

你应该在页面的源代码中修复它。

【讨论】:

  • 我相信这些行是自动生成的。他将不得不改变后端,这样它就不会通过线条传递。
  • 你可能是对的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-09-16
  • 1970-01-01
  • 1970-01-01
  • 2018-03-03
  • 2020-03-14
  • 2015-12-14
  • 2014-10-01
相关资源
最近更新 更多