gpt4 book ai didi

javascript - linkedin按钮动态渲染

转载 作者:数据小太阳 更新时间:2023-10-29 03:49:31 25 4
gpt4 key购买 nike

如何以动态方式呈现 linkedin 按钮?例如在运行时或页面完成加载后编写“<script type='in/share'></script>”。我已经测试过使用 jquery 编写它或将它附加到 body 标记中,但它不起作用。我将不胜感激任何帮助。谢谢。

最佳答案

对于任何仍然想知道如何执行此操作的人,在您加载您的

<script type="IN/Share"></script> //Don't forget other attributes

只需在您的 javascript 中调用 IN.init(),它就会呈现按钮。

开发者指南确实提到了一些关于使用未记录函数的内容,但是开发者网站上的这个论坛帖子:

https://developer.linkedin.com/forum/3-problems-share-button

正如 Eugene O'Neill(LinkedIn 的 Web 开发人员)所述

1) IN.Parse() and IN.Init() are here to stay. While we do employ the policy that any undocumented methods may or may not be supported indefinitely, these two are uniquely crucial to the functionality of the framework. The amount of work it would require to remove IN.Parse()... I don't even want to think about it ;). IN.Init() is our preferred method for loading the framework asynchronously and won't be going anywhere. Feel free to use either method.

关于javascript - linkedin按钮动态渲染,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5962088/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com