Recently I was asked:
Can you tell me if it is possible to embed a specific conversation in a site? I’ve tried every combination on the “Open Graph” possible to get a specific conversation thread to embed. I can’t seem to figure it out. And I’ve read your blog post and I don’t think you answer that here.
Questions like this one arise as ‘Threads’ are not exposed through the Yammer Embed widget or mentioned in the embed documentation. Hacking at some embed code to change the ‘Feed type’ to ‘thread’ and the ‘Feed ID’ to the ‘threadId’ of the specific conversation would be the logical approach. Alas this does not work. If you are a developer and fancy rolling up your sleeves there is a REST API item for threads but you’ll need to handle and style the resulting JSON payload which feels like too much work.
My recommended approach is to use Topics as they can be easily applied and surfaced in an embed feed. Topics themselves are a relatively undocumented feature but are immensely useful. For example we have their use embedded in our business process.
I digress, let’s get back to the answering the question.
When using topics to embed a specific thread I recommend that you use the threadId as the topic label as that saves you from inventing a word that describes the thread. Topics are also useful as you can then easily aggregate threads together at a later date.
- Obtain the threadId
- Locate the thread you wish to embed
- Selecting the date is a quick way of getting to the thread and its Id
- Grab the threadId of the thread from the address bar
- The URL of the thread in the address bar will be something like: https://www.yammer.com/yournetwork.com/#/Threads/show?threadId=751952638. You need the last part e.g. 751952638
- Add the threadId as a Topic label.
- Threads are a view of a single conversation
- Select the first message in the thread and add the threadId as a topic label
- Get the feedId of the Topic label
- Topic feeds are an aggregation of all instances of a label
- Select the topic label to go directly to the Topic feed
- Grab the feedId from the browser address bar
- The URL of the feed will be something like: https://www.yammer.com/yournewtork.com/topics/23315953#/Threads/AboutTopic?type=about_topic&feedId=23315953
- Note the feedId will not match the threadId. The reason for this that feedId for the topic is created after the threadId so it will have a different index number
- Use the feedId in your embed code (remember to set the ‘Feed type’ to ‘topic’)
- You can test using the Yammer Embed widget