Yammer - platform_social_buttons.min.js:2 Uncaught TypeError: yam.config is not a function
Yammer - platform_social_buttons.min.js:2 Uncaught TypeError: yam.config is not a function
我完全按照 https://developer.yammer.com/docs/share-button 实现了 Yammer 共享按钮。
就在我添加之前:
<script type="text/javascript" src="https://s0.assets-yammer.com/assets/platform_social_buttons.min.js"></script>
yam.platform.yammerShare();
然后在打开之后,作为测试,我添加了;
<span id="yj-share-button"></span>
结果 - 在 Chrome 和 Mac 上的 Firefox 中:
"Uncaught TypeError: yam.config is not a function"(匿名函数)@platform_social_buttons.min.js:2
所以我想;为什么不尝试加载 "yam.platform.yammerShare();" on document ready.. 但这没有什么区别。
我没有收到其他 JS 错误,这个特定错误发生在 platform_social_buttons.min.js 中。如果重要的话,我的网站运行 jQuery 2.1.4,尽管 https://developer.yammer.com/docs/share-button 没有说明 jQuery.
为什么会出现这个错误?我没有使用 JavaScript SDK,只是简单的分享按钮。
您必须在 platform_social_buttons.min.js
之前包含此脚本
<script src="https://c64.assets-yammer.com/assets/platform_embed.js"></script>
我完全按照 https://developer.yammer.com/docs/share-button 实现了 Yammer 共享按钮。
就在我添加之前:
<script type="text/javascript" src="https://s0.assets-yammer.com/assets/platform_social_buttons.min.js"></script>
yam.platform.yammerShare();
然后在打开之后,作为测试,我添加了;
<span id="yj-share-button"></span>
结果 - 在 Chrome 和 Mac 上的 Firefox 中: "Uncaught TypeError: yam.config is not a function"(匿名函数)@platform_social_buttons.min.js:2
所以我想;为什么不尝试加载 "yam.platform.yammerShare();" on document ready.. 但这没有什么区别。
我没有收到其他 JS 错误,这个特定错误发生在 platform_social_buttons.min.js 中。如果重要的话,我的网站运行 jQuery 2.1.4,尽管 https://developer.yammer.com/docs/share-button 没有说明 jQuery.
为什么会出现这个错误?我没有使用 JavaScript SDK,只是简单的分享按钮。
您必须在 platform_social_buttons.min.js
之前包含此脚本<script src="https://c64.assets-yammer.com/assets/platform_embed.js"></script>