本文介绍了是否可以在LinkedIn Share插件中预先填充消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们想使用 LinkedIn Share小部件;但是,我们希望使用一些默认文本来预填充该消息.这可能吗?

We would like to use LinkedIn Share widget; however, we want to pre-populate the message with some default text. Is this possible?

这是该插件的代码示例

<script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
<script type="IN/Share" data-counter="top"></script>

推荐答案

当您向共享插件传递要共享的URL时,LinkedIn的搜寻器将访问该URL尝试直接从页面中提取数据(可以从存在的OpenGraph标记中提取) ,或通过分析,等等的DOM元素)

When you pass the share plugin a URL to share, LinkedIn's crawler visits the URL to attempt to pull data from the page directly (either from OpenGraph tags that are present, or by analyzing DOM elements like , 's, etc.)

如果您要更改共享的内容,则必须修改那些本地DOM元素以匹配您要共享的内容(如果您自己控制页面),或者,不必使用小部件并通过API调用或URL模式切换共享,这两种方法都可以让您指定共享数据,而避免了爬虫程序代表您进行确定.

If you want to change the content that is shared, you'd either have to modify those local DOM elements to match what you want to share if you are in control of the page yourself, or alternatively, you have to not use the widget and switch sharing via API call or via the URL pattern, both of which let you specify share data and avoid the crawler determining that on your behalf.

有关通过API和URL共享的其他文档,可以在这里找到: https://developer .linkedin.com/docs/share-on-linkedin

Additional documentation on sharing via API and URL can be found here: https://developer.linkedin.com/docs/share-on-linkedin

这篇关于是否可以在LinkedIn Share插件中预先填充消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 14:21