0

below code is used to add a yammer newsfeed in my homepage of my spo site. but when i added inside an html file and tried to add it in a content editor web part, it failed to show :

   <!DOCTYPE html>
   <html>
     <head>
             <script type="text/javascript" src="https://s0.assets-
              yammer.com/assets/platform_embed.js"></script>
            <script type="text/javascript">
        yam.connect.embedFeed({
               container: "#embedded-feed",
         network: "mmycutomerrrr",
              feedType: "group",
           feedId: "001233444"
            });

Didnt understand why its failed to render. has anyone faced this issue before?

1

Your code provided has no closing tags. If it is exactly as you placed it here it will not work. Replace it with:

<!DOCTYPE html>
<html>
  <head>
          <script type="text/javascript" src="https://s0.assets-
           yammer.com/assets/platform_embed.js"></script>
         <script type="text/javascript">
     yam.connect.embedFeed({
            container: "#embedded-feed",
      network: "mmycutomerrrr",
           feedType: "group",
        feedId: "001233444"
         });
    </script>
</head>
</html>
1

Try renaming your file from ".html" to ".txt" and link it to the Content Editor web part, compare the results.

Use F12 developer tools to see if there are any script errors.

About how to embed a Yammer feed into a SharePoint Online site, check the article below:

https://support.office.com/en-us/article/embed-a-yammer-feed-into-a-sharepoint-site-4817d2fa-50f6-4f25-88a0-a312745768d4

  • I didn't get, why .Txt will work and .Html won't. Till now , i have used only .Html files for my branding of the other UI, that are residing in the site assets folder and referred it in the CE WP. And it worked. But this yammer feed WP is a new requirement , in which I am a new bie. Please elaborate a little bit whether renaming of .Html files to .Txt will also work ? – SaMolPP Jan 26 '18 at 13:45
  • It is because the Strict setting (The Browser File Handling settings in SharePoint impact how you can browse certain file types) is enforced and cannot be modified in SharePoint Online. The main reason for the change is that the Strict setting is more secure. So that, *.htm and *.html files in document libraries will no longer open in the browser. Refer to support.office.com/en-us/article/… – JoannaW_MSFT Jan 29 '18 at 1:58
  • If you think the reply is helpful, please mark it as the answer. – JoannaW_MSFT Jan 29 '18 at 2:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.