使用 LinkedIn 的分享按钮时出错
我正在尝试向我们的内容驱动网站添加 LinkedIn 共享按钮。我已经使用 按钮生成器 生成了嵌入代码,但是每当我尝试实际使用时按钮,我收到一个一般错误:
执行此操作时出现问题,请稍后重试。
它已经这样做了好几天了(自从我第一次添加代码以来),所以我不知道错误是在LinkedIn这边还是我的。有没有办法获得更具体的错误消息?他们提供的代码只是您粘贴的脚本标签:
<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/Share"></script>
不幸的是,LinkedIn 的“支持”论坛仅限于各种 API;没有地方可以提交有关构建按钮功能的问题。我希望其他人已经使用过这个功能并可以为我指明正确的方向。
I'm attempting to add a LinkedIn Share button to our content-driven website. I've generated the embed code using the button builder, but whenever I try to actually use the button, I get a generic error:
There was a problem performing this action, please try again later.
It's been doing this for several days (since I first added the code), so I don't know if the error is on the LinkedIn side or mine. Is there any way to get a more specific error message? The code they provide is just a script tag that you paste in:
<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/Share"></script>
Unfortunately LinkedIn's "support" forums are limited to the various API's; there's nowhere available to submit a question regarding the build-a-button functionality. I'm hoping someone else has used this function and can point me in the right direction.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您尝试共享的页面很可能无法通过网络访问(本地,使用 htaccess 密码或其他内容)。在我看来,LinkedIn 会尝试实际查看您正在共享的页面,如果无法访问该页面,则会向您显示此消息。
Most likely the page you are trying to share is not web accessible (local, under htaccess password or something). It looks to me like LinkedIn tries to actually look at the page you are sharing, and if it can't reach it, it gives you this message.
您共享的网址很可能未编码,请尝试对其进行编码,同时遵循 这篇文章了解更多信息。
Most likely the url which you are sharing is not encoded, try encoding that, also follow this article for more.
确保 linkedin 共享按钮正常工作的最简单方法是使用
其他替代方案。
The easiest way to ensure the linkedin share button works properly, is to use
instead of other alternatives.
查看 data-url 属性。删除“http://”并仅使用“www”。为您的网站网址。这至少解决了我的问题。
look at the data-url attrbute. Remove the "http://" and only use "www." for your website url. That fixed my issue at least.
我在 xhtml 中找到了这种验证方法:
删除空格,它可以工作!
I found this way for validate in xhtml:
Remove the white space and it works!
如果有人遇到此错误,并且无法找出原因,我建议检查您正在共享的页面的 URL:LinkedIn 帖子检查器。
因此,举例来说,如果我要查看 wikipedia.org 在共享时的外观,我会访问并输入该 URL,就像这样...
然后我看到...
但是这里有大量信息,显示了如何解析所有内容,从描述到标题再到缩略图显示的图像选择......
他们甚至为您提供有关如何修复页面的说明!嘿,这里有一些关于 Wikipedia.org 的建议!
If anyone is getting this error, and cannot figure out why, I recommend checking the URL of the page you're sharing with: LinkedIn Post Inspector.
So, for instance, if I were to check out how wikipedia.org looks when shared, I would visit and enter that URL, like so...
And I see...
But there's a ton of information here, showing how everything is parsed, from the description to the title to the image selection for thumbnail display...
They even give you instructions on how to fix your page! Hey, got some advice for Wikipedia.org here!