Yammer Embed Feed works in IE and Firefox but not in Chrome, gives 401 unauthorized

北城以北 提交于 2019-12-25 02:59:17

问题


ode :

<div id="embedded-feed" style="height: 99%; width: 100%; overflow: auto"></div>
<script src="https://assets.yammer.com/assets/platform_embed.js"></script>
<script>yam.connect.embedFeed({
    container: "#embedded-feed",
    network: "tcs.com",
    feedType: "group",
    feedId: "all"
});
</script>

Code works fine in IE and FireFox but in Chrome gives 401 Unauthorized

Console Error : GET https://www.yammer.com/tr8n/api/v1/language/translate?batch=true&source=yamjs 401 (Unauthorized)

However opening the link above link in a new tab gives proper ouput


回答1:


This is likely because you've disabled 3rd party cookies on Google Chrome at some stage -- I had the same problem.

  1. Browse to chrome://settings/content
  2. Uncheck the "Block third-party cookies and site data" checkbox
  3. Reload your page and the Yammer embed will likely start working



回答2:


Works for me using this script. Note SSO option in case you require.

<script type="text/javascript" src="https://assets.yammer.com/assets/platform_embed.js"></script>
<div id="embedded-feed" style="height:1000px;"></div>
<script>
yam.connect.embedFeed({
  container: '#embedded-feed'
          , network: 'tcs.com'
    , feedType: ' '
    , feedId: ' '
    , config: {
         use_sso: true
         , header: false
         , footer: false
         , showOpenGraphPreview: false
         , defaultToCanonical: false
         , hideNetworkName: true
            , promptText: 'Enter an update or question here...'
    }
});



来源:https://stackoverflow.com/questions/23248749/yammer-embed-feed-works-in-ie-and-firefox-but-not-in-chrome-gives-401-unauthori

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!