Yammer for WordPress
Use this guide, if you want to embed a Yammer feed in a WordPress page or post.
Before you start
- You must already have configured the single sign-on capability of the WordPress + Office 365 plugin.
- Additionally, you must also already have configured the integration capability of the plugin.
- You are a Global Administrator for your company’s Office 365 tenant / Azure AD directory (or have at least the ability to edit the Azure Active Directory App registration that was created previously when the single sign-on capability was configured).
- You are an Administrator for your WordPress website.
- In Azure Portal click the 'hamburger' (icon with three horizontal lines in the upper corner) to open the menu.
- Navigate to Azure Active Directory > App registrations.
- Select the App registration that you created when you configured the single sign-on capability of the plugin.
- Click API permissions from the 'App registration' menu on the left
- Click + Add permission.
- Select Yammer > Delegated permissions.
- Navigate to WP Admin > WPO365 > Integration.
- Click Delete tokens.
- Click Save configuration.
When you see an error that states "... No authorization code and refresh token found when trying to get an access token for https://graph.microsoft.com/User.Read. The current user must sign out of the WordPress website and log back in again to retrieve a fresh authorization code that can be used in exchange for access tokens ..." Then please sign out of your WordPress website and immediately sign back in (with Microsoft) into your site. This will ensure that the plugin retrieved a fresh set of access tokens on your behalf.
Generate a Yammer shortcode
- Navigate to WP Admin > WPO365 > ... > Yammer.
- Select the type of feed that you'd like to integrate.
- If you created and uploaded your own handlebars template (see https://www.wpo365.com/working-with-handlebars-templates/ for details) then update the default link.
- Enter the results per page (= number of messages) that should be retrieved initially (and subsequently each time the user clicks the Load more button at the bottom of the feed).
- Optionally you can choose to hide paging (= hide the Load more button).
- Optionally you can choose to hide images.
- Click Copy shortcode to clipboard.
Embed a Yammer feed in a WordPress page or post
- From the WordPress Admin Bar, click + New to add a new WordPress page or post.
- On the page or post, type shortcode in the block navigator and click the shortcode shortcut to add a new shortcode block to the page or post.
- In the shortcode editor, click Ctrl+V (or right mouse click and click Paste) to paste the shortcode.
- Publish the page and then click View post to check the result.