SlideShare a Scribd company logo
Online Conference
June 17th and 18th 2015
WWW.COLLAB365.EVENTS
Build your own Yammer App
WWW.COLLAB365.EVENTS
Alexander Meijers
Lead Architect @ Portiva
Twitter: @ameijers
Email: alexander@appzinside.com
Phone: +31652012406
Apps | Azure | SharePoint | Office 365 |
Development | Functional | Architecture |
Love to connect with people | Community
Fan | Speaker | Blogger | 2 kids | Fitness |
Airsoft
WWW.COLLAB365.EVENTS
Agenda
• What about Yammer
• Integration with Yammer
• Yammer API
– REST API
– JavaScript SDK
– Yammer Embed
– Open Graph
• Yammer and .NET
• Takeaways & round up
WWW.COLLAB365.EVENTS
Yammer
WWW.COLLAB365.EVENTS
What is Yammer?
• It allows organizations to extend their
systems socially by using one or more
social networks
• Create communities around
content
• What can you do?
– Send and receive messages
– Show activity around objects
– Follow and like messages, topics and
other information
WWW.COLLAB365.EVENTS
Networks
• Internal network
– Also called a Home Network
– Private and secure collaboration space for company employees to connect
with their coworkers
– Only available for employees with verified corporate e-mail addresses
• External network
– Separate extension of your Home network
– Private and secure collaboration space for your company to engage with
users outside the organization
– Allows to invite users from outside your organization
– Access is invitation only
WWW.COLLAB365.EVENTS
Yammer main structure
WWW.COLLAB365.EVENTS
Example of Yammer network
WWW.COLLAB365.EVENTS
Versions
Basic
(Freemium)
Enterprise
(paid)
Basic Yammer Features X X
Collaboration Features X X
Yammer Mobile X X
Apps X X
Admin Tools X
Network level Apps and integration X
Support and Services X
WWW.COLLAB365.EVENTS
Roles and rights
• More information
– http://www.collabshow.com/2014/01/06/yammer-roles-permissions-drill-
down
Member All users are at least a member of the Yammer network. Ability to
use yammer.
Group admin The person who created a group becomes the group admin of that
group. It allows to add and remove members from that group.
Network admin / admin This role manages the network. This requires a “paid” network.
Verified admin The role has all the abilities and is sometimes called the one with
“God” rights. This requires a “paid” network.
WWW.COLLAB365.EVENTS
Integration with Yammer
WWW.COLLAB365.EVENTS
Integration possibilities
• SharePoint add-ins
– On-premises or online
• Office 365
• Office add-ins
• Azure Apps and Services
• Other platforms
WWW.COLLAB365.EVENTS
SharePoint integration in Yammer
• Yammer Web Part
– Discontinued and stopped working on September 15th, 2015
(http://goo.gl/k2LuSs)
• Yammer Embed
– Microsoft’s single solution to integrate Yammer feeds into
SharePoint.
• Other options as document and list integration, federated
search, activity streams, single sign-on, admin
configurations
– http://support.microsoft.com/kb/2835453
WWW.COLLAB365.EVENTS
SharePoint Add-ins explained
Add-in
Web
On-
premises
SharePoint
Add-in
Web
SharePoint
Online
Parent Web
(Host)
App Web
Add-in runs on local web server
or in the cloud.
High trust is needed!
Add-in runs on local web server
or in the cloud.
Provider-hosted
SharePoint Add-in
The add-in runs in a separate host
Or as a service. Use your own
Choice of server hosting
Architecture. Code is allowed!
SharePoint-Hosted Add-in
Creation of isolated sub web on a parent web
Contains only web elements
Examples are lists, out-of-the box Web Parts
No server code allowed, only client JavaScript for logic and UX
WWW.COLLAB365.EVENTS
What are the possibilities?
• Embedding code directly on Page
– Publishing Page, Content Page, Any Page
• Your own custom
– Web Part
– User Control
• SharePoint Add-ins
– SharePoint hosted Add-in
– Provider-hosted SharePoint Add-in
• Azure Apps and Services
– Coding based on .NET, JavaScript or other
language at your choice
WWW.COLLAB365.EVENTS
Best practices - APIs
Embed code
on page
User
Control
Web Part
SharePoint-
Hosted Add-
in
SharePoint
Provider-
Hosted Add-in
Azure Apps /
Service
Other
platforms
Yammer
Embed
Yes Yes Yes
Yes, with some
exceptions as
like, follow and
commenting
No Yes
Yes, if
JavaScript is
possible
Yammer JS
SDK
No Yes Yes Yes No Yes
Yes, if
JavaScript is
possible
REST API No
Yes, using
.NET code
Yes, using
.NET code
Yes, only
through
JavaScript calls
Yes, using .NET
code
Yes
Yes, mostly
through
Javascript calls
WWW.COLLAB365.EVENTS
Yammer API
WWW.COLLAB365.EVENTS
Yammer API overview
• Documentation
– Documentation got a lot better!
– http://developer.yammer.com/documentation
• Available APIs
– REST API
– JavaScript SDK
– Other SDKs for iOS, Windows Phone 8,
Ruby and Python
• Widgets with Yammer Embed
• Yammer uses the Open Graph protocol for activities
– <Actor> <Action> <Object> on <App Name> : <Message>
• Data returned as JSON
WWW.COLLAB365.EVENTS
Register a Yammer App
• App registration
– Go to https://www.yammer.com/client_applications and register an App
– Register an App for testing
• What do you get back?
– Client ID = 8LIaFJoKeMB6SjDg3nI1LA
– Client Secret = dXHDf0hGYG0I268rtgn
JNUaq8jFJokEUqelVHKKwg
• Define a redirect URL
– Expected Redirect = http://www.yammer.com
WWW.COLLAB365.EVENTS
DEMO
Register a Yammer App
WWW.COLLAB365.EVENTS
Demo – Round up
• Registration of a Yammer App
– Use it for creating a test app to work on
• Publishing for use by others
WWW.COLLAB365.EVENTS
REST API
WWW.COLLAB365.EVENTS
REST API
• REST interface to Yammer resources
– Interface is mostly used by other APIs when accessing data
• Before accessing REST API
– Register an App at Yammer
– Your App needs to authenticate a Yammer user through OAuth 2
• Call REST API endpoints with an access token
• Documentation
– https://developer.yammer.com/docs/rest-api-rate-limits
– Each function has a “Try out!”
WWW.COLLAB365.EVENTS
Authenticate – OAuth flows
• Server-Side flow
– Referred to as “Authorization Code Grant”
– Use whenever you call the Yammer API from your web
application server
• Client-Side flow
– Referred to as “Implicit Grant”
– Use whenever you need to make API calls from a client
such as JavaScript running in a web browser or from native
mobile or desktop applications
WWW.COLLAB365.EVENTS
Authenticate – Server-Side flow
• Yammer uses OAuth 2
• User Authentication and App Authorization
– https://www.yammer.com/dialog/oauth?client_id=LIaFJoKeMB6SjDg1LA&redirect_uri=http://www.yammer.
com
– It requests to login and to authorize the App to use your data
• After successful login and authorizing the app your are redirected
– https://www.yammer.com/portiva.nl/?code=1U8BguaHAEJokENBsHO8wmcQ
WWW.COLLAB365.EVENTS
Authenticate – Server-Side flow
• Get your Access Token
– https://www.yammer.com/oauth2/access_token.json?client_id=8daFanMJOkeB6SjDg31nI1LA
&client_secret=dXHD9f00I268rtgnJJokeNuUaq8j3tUqelVHKKwg&code=o3Su14YEuowqSJoke
Cfg
– Access Token can be found in the returned JSON
WWW.COLLAB365.EVENTS
Authenticate – Client-Side flow
• Get your Access Token
– https://www.yammer.com/dialog/oauth?client_id=dIaFnMB6SJokEjg31nI1LA&redirect_uri=ht
tp://www.yammer.com&response_type=token
– Get access token from redirected URL
– https://www.yammer.com/portiva.nl/#access_token=bl7qByjG0CgVag2OJokEc8w
• Access token is valid for many years or longer
WWW.COLLAB365.EVENTS
DEMO
Authentication
WWW.COLLAB365.EVENTS
Demo – Round up
• Using REST API calls to authenticate an App
• Explained the different dialog popups you get
and when they are shown
• Getting the access token
• Explain the JSON payload returned
WWW.COLLAB365.EVENTS
REST API - Resources
• Messages
– View messages like all, my feed, following,
private, received
– Posting messages
– Other like pending attachments, email
messages, view threads, likes
• Topics (#)
• Groups
– Join and leave groups
• Users
– Retrieve, view current user, view user, in
group, suspend or delete
• Relationships
– Show, add and remove organizational
chart relationship
• Notifications
– Get from current user
• Suggestions
– View and decline suggestions
• Subscriptions
– Check subscribed to thread or user
– Subscribe and unsubscribe
• Autocomplete
– Returns suggestions
• Invitations
• Search
• Networks
– List of networks
– Switch between network
WWW.COLLAB365.EVENTS
REST API – Interesting endpoints
Endpoints Parameters
Messages
https://www.yammer.com/api/v1/messages.json
https://www.yammer.com/api/v1/messages/following.json
https://www.yammer.com/api/v1/messages/private.json
older_than
newer_than
threaded
limit
Users
https://www.yammer.com/api/v1/users/current.json
https://www.yammer.com/api/v1/users/[:id].json
Relationships https://www.yammer.com/api/v1/relationships.json user_id
Notifications https://www.yammer.com/api/v1/streams/notifications.json
Search https://www.yammer.com/api/v1/search.json
search
page
num_per_page
WWW.COLLAB365.EVENTS
DEMO
REST API Call
WWW.COLLAB365.EVENTS
Demo – Round up
• Use REST API to get information about the
current user and messages
• Explain about the JSON returned
WWW.COLLAB365.EVENTS
REST API – Rate Limits
• API calls are subject to rate limiting
• Limits are per user per App
• Limits are independently from each other in the same time period
• More information
– https://developer.yammer.com/docs/rest-api-rate-limits#rate-limits
Requests in Seconds
Messages 10 30
Notifications 10 30
Autocomplete 10 10
All other resources 10 10
WWW.COLLAB365.EVENTS
JavaScript SDK
WWW.COLLAB365.EVENTS
JavaScript SDK
• Allows you to authenticate users and access Yammer through some
wrapper
• Newest version released on April 7th 2014
– New security features to enhance login techniques
• Using JavaScript is easy
• Use https://c64.assets-yammer.com/assets/platform_js_sdk.js
• Enter your Yammer App ID in the data-app-id parameter
WWW.COLLAB365.EVENTS
JavaScript SDK - Authenticate
• Authentication is handled for you
• A cool Yammer login button
WWW.COLLAB365.EVENTS
JavaScript SDK – Access data
• Make calls directly to the
Yammer REST API
– Use yam.platform.request
WWW.COLLAB365.EVENTS
Yammer Embed
WWW.COLLAB365.EVENTS
Yammer Embed
• A set of widgets to quickly create Yammer implementations
• Not many customizations possible
• Widgets like Specified feeds, Open Graph feeds, Action buttons and
Commenting
• Widget is block of script placed in:
– Content Editor Web Part
– Page
– SharePoint Hosted Add-in
• Needs a HTML Container 400 pixels or larger in your application
• Documentation
– https://developer.yammer.com/docs/embed
WWW.COLLAB365.EVENTS
Yammer Embed – Script generator
• Embed script generation
– https://www.yammer.com/widget/configure
• Type of feeds
– Group, Open Graph, User, Topics, My feed
WWW.COLLAB365.EVENTS
Yammer Embed – Single Sign-On
• Support for Single Sign On
WWW.COLLAB365.EVENTS
Yammer Embed – Open Graph buttons
• Enables social interaction with systems like blog posts, content pages and
other content.
• It uses Open Graph objects
• Like button
– <user> likes <object>
– Bound to the URL of the object
• Follow button
– <user> follows <object>
– Bound to the URL of the object
WWW.COLLAB365.EVENTS
Yammer Embed - Commenting
• Actually a Feed widget of the type “Open Graph”
• Can be used as commenting system for internal blogs or any line of
business application
• OG Object is created by the first user using it
• URL and OG metadata of page is used
• Other properties like header, footer, prompt text and more
WWW.COLLAB365.EVENTS
Open Graph
WWW.COLLAB365.EVENTS
Open Graph
• Is a light weight data integration protocol
• Activities are posted as OG Objects
• Format
– <Actor> <Action> <Object> on <App Name> : <Message>
– E.g. Alexander created Company meeting on YammerTestAppForPortiva : Lets meet!
• Description
Actor A Yammer user
Action A verb describing what happens. E.g. created, updated, deleted, liked, followed
Create your own verbs per App on yammer.com
Object Represents an instance in your App and are uniquely identified.
Supported are place, person, department, team, project, folder, file, document, image, audio,
video and company
App Name Name of your App doing the post
Message The message shown
WWW.COLLAB365.EVENTS
Open Graph - Custom
• Create your own objects and verbs
• Define a namespace
• Object Type
– Singular form
– Plural form
• Action types
– Present tense
– Past tense
WWW.COLLAB365.EVENTS
Open Graph - Custom
• An Open Graph Object is posted through the activity endpoint
– https://www.yammer.com/api/v1/activity.json
• Example JSON payload
{
"activity":{
"actor":{"name":“Alexander Meijers",
"email":“ameijers@portiva.nl"},
"action":"create", "object": {
"url":“http://www.yammer.com",
"title":“Corporate Meeting"
},
"message":“Lets meet!",
}
WWW.COLLAB365.EVENTS
Yammer and .NET
WWW.COLLAB365.EVENTS
Yammer.NET
• A way to use Yammer APIs in .NET applications
– Based on the .NET classes of Steve Peschka
http://blogs.technet.com/b/speschka/archive/2013/10/05/using-the-
yammer-api-in-a-net-client-application.aspx
• Connecting to Yammer
– Authentication through REST API calls by using WebRequest calls
– Setting the cookies (yamtrak_id and _workfeed_session_id)
• Serializing JSON data through .NET classes
• Access it from
– Console application
– Provider hosted App in SharePoint 2013
WWW.COLLAB365.EVENTS
Takeaways & round up
• Documentation is nowadays better!
• The REST part is enough to create rich implementations
• Use access token to use yammer APIs on behalf of an user. Valid for
years.
• Use Yammer Embed to create Yammer implementations quickly and
with an ease
• Open Graph allows you to create your own objects within your
yammer implementation
• Using .NET building Yammer Apps is great. Especially with an
Yammer.NET Library
WWW.COLLAB365.EVENTS
Stay tuned for more great sessions …

More Related Content

PPTX
Build you own yammer app
PPTX
Yammer for developers
PPTX
Biwug1903 yammer-development
PDF
O365con14 - a developer jam with yammer
PPTX
7 Deadly Sins in Azure AD App Development
PPTX
SharePoint 2013 Hosted App Presentation by Roy Kim
PDF
La collaboration dans Exchange : comparaison on premises et online
PPTX
Push notification to the open web
Build you own yammer app
Yammer for developers
Biwug1903 yammer-development
O365con14 - a developer jam with yammer
7 Deadly Sins in Azure AD App Development
SharePoint 2013 Hosted App Presentation by Roy Kim
La collaboration dans Exchange : comparaison on premises et online
Push notification to the open web

What's hot (20)

PPTX
Brug - Web push notification
PPTX
Introduction to OAuth 2.0 - the technology you need but never really learned
PDF
The Future of the web
PPTX
Site templates, site life cycle management and Modern SharePoint
PDF
Future of the Web
PDF
A year with progressive web apps! #DevConMU
PDF
Why Would A Programmer Fall In Love With SPA?
PPTX
There’s an API for that! Why and how to build on the IBM Connections PLATFORM
PPTX
PWA - Progressive Web App
PDF
Dive Deep Into the Force.com Canvas Framework
PPTX
Introduction to OAuth
PPTX
Introduction to Progressive Web Applications
PPTX
Frontend State of the union
PDF
Создание API, которое полюбят разработчики. Глубокое погружение
PPTX
Seamless Authentication with Force.com Canvas
PPTX
PWA demystified
PDF
Service workers are your best friends
KEY
Managing site collections
PPTX
Force.com Canvas - a Quick Introduction
PPTX
Progressive Web Application
Brug - Web push notification
Introduction to OAuth 2.0 - the technology you need but never really learned
The Future of the web
Site templates, site life cycle management and Modern SharePoint
Future of the Web
A year with progressive web apps! #DevConMU
Why Would A Programmer Fall In Love With SPA?
There’s an API for that! Why and how to build on the IBM Connections PLATFORM
PWA - Progressive Web App
Dive Deep Into the Force.com Canvas Framework
Introduction to OAuth
Introduction to Progressive Web Applications
Frontend State of the union
Создание API, которое полюбят разработчики. Глубокое погружение
Seamless Authentication with Force.com Canvas
PWA demystified
Service workers are your best friends
Managing site collections
Force.com Canvas - a Quick Introduction
Progressive Web Application
Ad

Similar to Build your own yammer app @ Collab365 (20)

PPTX
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
PDF
CIS14: SCIM: Why It’s More Important, and More Simple, Than You Think
PPTX
SharePoint 2013 App or Not to App
PDF
Salesforce Winter 23 Release Webinar Slide Deck
PPTX
Social Architecture of SharePoint 2013 for Developers
PPTX
SharePoint 2013 - What's New
PPTX
Odata V4 : The New way to REST for Your Applications
PPTX
Feature List
PPTX
Cloud-Based App Development using SharePoint 2013, Office 365 and Azure
PPTX
Toronto ACE Sept 2022.pptx
PPTX
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
PPTX
WordCamp GR 2012 Web Apps for the Masses
PPTX
IBM Social Business Toolkit
PDF
What's New for Developers in SharePoint 2013
PDF
DEF CON 27 - DIRK JAN MOLLEMA - im in your cloud pwning your azure environment
PPTX
Adding Identity Management and Access Control to your Application - Exersices
PPTX
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
PDF
CRM and Ecommerce. Yoav Kutner
PDF
BlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure AD
PPTX
Developing social solutions on Microsoft technologies (SP Social and Yammer)
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
CIS14: SCIM: Why It’s More Important, and More Simple, Than You Think
SharePoint 2013 App or Not to App
Salesforce Winter 23 Release Webinar Slide Deck
Social Architecture of SharePoint 2013 for Developers
SharePoint 2013 - What's New
Odata V4 : The New way to REST for Your Applications
Feature List
Cloud-Based App Development using SharePoint 2013, Office 365 and Azure
Toronto ACE Sept 2022.pptx
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
WordCamp GR 2012 Web Apps for the Masses
IBM Social Business Toolkit
What's New for Developers in SharePoint 2013
DEF CON 27 - DIRK JAN MOLLEMA - im in your cloud pwning your azure environment
Adding Identity Management and Access Control to your Application - Exersices
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
CRM and Ecommerce. Yoav Kutner
BlueHat Seattle 2019 || I'm in your cloud: A year of hacking Azure AD
Developing social solutions on Microsoft technologies (SP Social and Yammer)
Ad

More from Alexander Meijers (20)

PPTX
Microsoft ignite tour - Create an immersive experience with office 365 data ...
PPTX
Microsoft ignite tour empower your workers using remote assist - theater se...
PPTX
O365 and SharePoint Connect - Create an immersive experience with office 365...
PPTX
Modern workplace conference create an immersive experience with office 365 ...
PPTX
Code motion - Extend visualization of microsoft graph data to hololens applic...
PPTX
Code europe holobasics - develop your mixed reality hololens app with unity...
PPTX
Code europe holoadvanced - building more advanced mixed reality apps for ho...
PPTX
Azure thursday HoloLens and cognitive services a powerful combination
PPTX
It next summit - holobasics - develop your mixed reality hololens app with un...
PPTX
SharePoint Unite - Build business applications with HoloLens and Cloud
PPTX
HoloLens inspiration session
PPTX
Holo basics develop your mixed reality hololens app with unity and visual s...
PPTX
Build business applications with HoloLens and Cloud
PPTX
Achmea technight - HoloLens development
PPTX
Spsbe2016 extend your office 365 environement to cross-platform apps
PPTX
Implementation of azure active directory authentication with cross platform d...
PPTX
An introduction to DevOps
PPTX
Develop business apps cross-platform development using visual studio with x...
PPTX
SharePoint 2013 for internet websites
PPTX
Sp24 design a share point 2013 architecture – the basics
Microsoft ignite tour - Create an immersive experience with office 365 data ...
Microsoft ignite tour empower your workers using remote assist - theater se...
O365 and SharePoint Connect - Create an immersive experience with office 365...
Modern workplace conference create an immersive experience with office 365 ...
Code motion - Extend visualization of microsoft graph data to hololens applic...
Code europe holobasics - develop your mixed reality hololens app with unity...
Code europe holoadvanced - building more advanced mixed reality apps for ho...
Azure thursday HoloLens and cognitive services a powerful combination
It next summit - holobasics - develop your mixed reality hololens app with un...
SharePoint Unite - Build business applications with HoloLens and Cloud
HoloLens inspiration session
Holo basics develop your mixed reality hololens app with unity and visual s...
Build business applications with HoloLens and Cloud
Achmea technight - HoloLens development
Spsbe2016 extend your office 365 environement to cross-platform apps
Implementation of azure active directory authentication with cross platform d...
An introduction to DevOps
Develop business apps cross-platform development using visual studio with x...
SharePoint 2013 for internet websites
Sp24 design a share point 2013 architecture – the basics

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Empathic Computing: Creating Shared Understanding
PDF
Machine learning based COVID-19 study performance prediction
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
Teaching material agriculture food technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Cloud computing and distributed systems.
PDF
KodekX | Application Modernization Development
PDF
Modernizing your data center with Dell and AMD
Chapter 3 Spatial Domain Image Processing.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Reach Out and Touch Someone: Haptics and Empathic Computing
Empathic Computing: Creating Shared Understanding
Machine learning based COVID-19 study performance prediction
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Review of recent advances in non-invasive hemoglobin estimation
20250228 LYD VKU AI Blended-Learning.pptx
Teaching material agriculture food technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
MYSQL Presentation for SQL database connectivity
Network Security Unit 5.pdf for BCA BBA.
Cloud computing and distributed systems.
KodekX | Application Modernization Development
Modernizing your data center with Dell and AMD

Build your own yammer app @ Collab365

  • 1. Online Conference June 17th and 18th 2015 WWW.COLLAB365.EVENTS Build your own Yammer App
  • 2. WWW.COLLAB365.EVENTS Alexander Meijers Lead Architect @ Portiva Twitter: @ameijers Email: alexander@appzinside.com Phone: +31652012406 Apps | Azure | SharePoint | Office 365 | Development | Functional | Architecture | Love to connect with people | Community Fan | Speaker | Blogger | 2 kids | Fitness | Airsoft
  • 3. WWW.COLLAB365.EVENTS Agenda • What about Yammer • Integration with Yammer • Yammer API – REST API – JavaScript SDK – Yammer Embed – Open Graph • Yammer and .NET • Takeaways & round up
  • 5. WWW.COLLAB365.EVENTS What is Yammer? • It allows organizations to extend their systems socially by using one or more social networks • Create communities around content • What can you do? – Send and receive messages – Show activity around objects – Follow and like messages, topics and other information
  • 6. WWW.COLLAB365.EVENTS Networks • Internal network – Also called a Home Network – Private and secure collaboration space for company employees to connect with their coworkers – Only available for employees with verified corporate e-mail addresses • External network – Separate extension of your Home network – Private and secure collaboration space for your company to engage with users outside the organization – Allows to invite users from outside your organization – Access is invitation only
  • 9. WWW.COLLAB365.EVENTS Versions Basic (Freemium) Enterprise (paid) Basic Yammer Features X X Collaboration Features X X Yammer Mobile X X Apps X X Admin Tools X Network level Apps and integration X Support and Services X
  • 10. WWW.COLLAB365.EVENTS Roles and rights • More information – http://www.collabshow.com/2014/01/06/yammer-roles-permissions-drill- down Member All users are at least a member of the Yammer network. Ability to use yammer. Group admin The person who created a group becomes the group admin of that group. It allows to add and remove members from that group. Network admin / admin This role manages the network. This requires a “paid” network. Verified admin The role has all the abilities and is sometimes called the one with “God” rights. This requires a “paid” network.
  • 12. WWW.COLLAB365.EVENTS Integration possibilities • SharePoint add-ins – On-premises or online • Office 365 • Office add-ins • Azure Apps and Services • Other platforms
  • 13. WWW.COLLAB365.EVENTS SharePoint integration in Yammer • Yammer Web Part – Discontinued and stopped working on September 15th, 2015 (http://goo.gl/k2LuSs) • Yammer Embed – Microsoft’s single solution to integrate Yammer feeds into SharePoint. • Other options as document and list integration, federated search, activity streams, single sign-on, admin configurations – http://support.microsoft.com/kb/2835453
  • 14. WWW.COLLAB365.EVENTS SharePoint Add-ins explained Add-in Web On- premises SharePoint Add-in Web SharePoint Online Parent Web (Host) App Web Add-in runs on local web server or in the cloud. High trust is needed! Add-in runs on local web server or in the cloud. Provider-hosted SharePoint Add-in The add-in runs in a separate host Or as a service. Use your own Choice of server hosting Architecture. Code is allowed! SharePoint-Hosted Add-in Creation of isolated sub web on a parent web Contains only web elements Examples are lists, out-of-the box Web Parts No server code allowed, only client JavaScript for logic and UX
  • 15. WWW.COLLAB365.EVENTS What are the possibilities? • Embedding code directly on Page – Publishing Page, Content Page, Any Page • Your own custom – Web Part – User Control • SharePoint Add-ins – SharePoint hosted Add-in – Provider-hosted SharePoint Add-in • Azure Apps and Services – Coding based on .NET, JavaScript or other language at your choice
  • 16. WWW.COLLAB365.EVENTS Best practices - APIs Embed code on page User Control Web Part SharePoint- Hosted Add- in SharePoint Provider- Hosted Add-in Azure Apps / Service Other platforms Yammer Embed Yes Yes Yes Yes, with some exceptions as like, follow and commenting No Yes Yes, if JavaScript is possible Yammer JS SDK No Yes Yes Yes No Yes Yes, if JavaScript is possible REST API No Yes, using .NET code Yes, using .NET code Yes, only through JavaScript calls Yes, using .NET code Yes Yes, mostly through Javascript calls
  • 18. WWW.COLLAB365.EVENTS Yammer API overview • Documentation – Documentation got a lot better! – http://developer.yammer.com/documentation • Available APIs – REST API – JavaScript SDK – Other SDKs for iOS, Windows Phone 8, Ruby and Python • Widgets with Yammer Embed • Yammer uses the Open Graph protocol for activities – <Actor> <Action> <Object> on <App Name> : <Message> • Data returned as JSON
  • 19. WWW.COLLAB365.EVENTS Register a Yammer App • App registration – Go to https://www.yammer.com/client_applications and register an App – Register an App for testing • What do you get back? – Client ID = 8LIaFJoKeMB6SjDg3nI1LA – Client Secret = dXHDf0hGYG0I268rtgn JNUaq8jFJokEUqelVHKKwg • Define a redirect URL – Expected Redirect = http://www.yammer.com
  • 21. WWW.COLLAB365.EVENTS Demo – Round up • Registration of a Yammer App – Use it for creating a test app to work on • Publishing for use by others
  • 23. WWW.COLLAB365.EVENTS REST API • REST interface to Yammer resources – Interface is mostly used by other APIs when accessing data • Before accessing REST API – Register an App at Yammer – Your App needs to authenticate a Yammer user through OAuth 2 • Call REST API endpoints with an access token • Documentation – https://developer.yammer.com/docs/rest-api-rate-limits – Each function has a “Try out!”
  • 24. WWW.COLLAB365.EVENTS Authenticate – OAuth flows • Server-Side flow – Referred to as “Authorization Code Grant” – Use whenever you call the Yammer API from your web application server • Client-Side flow – Referred to as “Implicit Grant” – Use whenever you need to make API calls from a client such as JavaScript running in a web browser or from native mobile or desktop applications
  • 25. WWW.COLLAB365.EVENTS Authenticate – Server-Side flow • Yammer uses OAuth 2 • User Authentication and App Authorization – https://www.yammer.com/dialog/oauth?client_id=LIaFJoKeMB6SjDg1LA&redirect_uri=http://www.yammer. com – It requests to login and to authorize the App to use your data • After successful login and authorizing the app your are redirected – https://www.yammer.com/portiva.nl/?code=1U8BguaHAEJokENBsHO8wmcQ
  • 26. WWW.COLLAB365.EVENTS Authenticate – Server-Side flow • Get your Access Token – https://www.yammer.com/oauth2/access_token.json?client_id=8daFanMJOkeB6SjDg31nI1LA &client_secret=dXHD9f00I268rtgnJJokeNuUaq8j3tUqelVHKKwg&code=o3Su14YEuowqSJoke Cfg – Access Token can be found in the returned JSON
  • 27. WWW.COLLAB365.EVENTS Authenticate – Client-Side flow • Get your Access Token – https://www.yammer.com/dialog/oauth?client_id=dIaFnMB6SJokEjg31nI1LA&redirect_uri=ht tp://www.yammer.com&response_type=token – Get access token from redirected URL – https://www.yammer.com/portiva.nl/#access_token=bl7qByjG0CgVag2OJokEc8w • Access token is valid for many years or longer
  • 29. WWW.COLLAB365.EVENTS Demo – Round up • Using REST API calls to authenticate an App • Explained the different dialog popups you get and when they are shown • Getting the access token • Explain the JSON payload returned
  • 30. WWW.COLLAB365.EVENTS REST API - Resources • Messages – View messages like all, my feed, following, private, received – Posting messages – Other like pending attachments, email messages, view threads, likes • Topics (#) • Groups – Join and leave groups • Users – Retrieve, view current user, view user, in group, suspend or delete • Relationships – Show, add and remove organizational chart relationship • Notifications – Get from current user • Suggestions – View and decline suggestions • Subscriptions – Check subscribed to thread or user – Subscribe and unsubscribe • Autocomplete – Returns suggestions • Invitations • Search • Networks – List of networks – Switch between network
  • 31. WWW.COLLAB365.EVENTS REST API – Interesting endpoints Endpoints Parameters Messages https://www.yammer.com/api/v1/messages.json https://www.yammer.com/api/v1/messages/following.json https://www.yammer.com/api/v1/messages/private.json older_than newer_than threaded limit Users https://www.yammer.com/api/v1/users/current.json https://www.yammer.com/api/v1/users/[:id].json Relationships https://www.yammer.com/api/v1/relationships.json user_id Notifications https://www.yammer.com/api/v1/streams/notifications.json Search https://www.yammer.com/api/v1/search.json search page num_per_page
  • 33. WWW.COLLAB365.EVENTS Demo – Round up • Use REST API to get information about the current user and messages • Explain about the JSON returned
  • 34. WWW.COLLAB365.EVENTS REST API – Rate Limits • API calls are subject to rate limiting • Limits are per user per App • Limits are independently from each other in the same time period • More information – https://developer.yammer.com/docs/rest-api-rate-limits#rate-limits Requests in Seconds Messages 10 30 Notifications 10 30 Autocomplete 10 10 All other resources 10 10
  • 36. WWW.COLLAB365.EVENTS JavaScript SDK • Allows you to authenticate users and access Yammer through some wrapper • Newest version released on April 7th 2014 – New security features to enhance login techniques • Using JavaScript is easy • Use https://c64.assets-yammer.com/assets/platform_js_sdk.js • Enter your Yammer App ID in the data-app-id parameter
  • 37. WWW.COLLAB365.EVENTS JavaScript SDK - Authenticate • Authentication is handled for you • A cool Yammer login button
  • 38. WWW.COLLAB365.EVENTS JavaScript SDK – Access data • Make calls directly to the Yammer REST API – Use yam.platform.request
  • 40. WWW.COLLAB365.EVENTS Yammer Embed • A set of widgets to quickly create Yammer implementations • Not many customizations possible • Widgets like Specified feeds, Open Graph feeds, Action buttons and Commenting • Widget is block of script placed in: – Content Editor Web Part – Page – SharePoint Hosted Add-in • Needs a HTML Container 400 pixels or larger in your application • Documentation – https://developer.yammer.com/docs/embed
  • 41. WWW.COLLAB365.EVENTS Yammer Embed – Script generator • Embed script generation – https://www.yammer.com/widget/configure • Type of feeds – Group, Open Graph, User, Topics, My feed
  • 42. WWW.COLLAB365.EVENTS Yammer Embed – Single Sign-On • Support for Single Sign On
  • 43. WWW.COLLAB365.EVENTS Yammer Embed – Open Graph buttons • Enables social interaction with systems like blog posts, content pages and other content. • It uses Open Graph objects • Like button – <user> likes <object> – Bound to the URL of the object • Follow button – <user> follows <object> – Bound to the URL of the object
  • 44. WWW.COLLAB365.EVENTS Yammer Embed - Commenting • Actually a Feed widget of the type “Open Graph” • Can be used as commenting system for internal blogs or any line of business application • OG Object is created by the first user using it • URL and OG metadata of page is used • Other properties like header, footer, prompt text and more
  • 46. WWW.COLLAB365.EVENTS Open Graph • Is a light weight data integration protocol • Activities are posted as OG Objects • Format – <Actor> <Action> <Object> on <App Name> : <Message> – E.g. Alexander created Company meeting on YammerTestAppForPortiva : Lets meet! • Description Actor A Yammer user Action A verb describing what happens. E.g. created, updated, deleted, liked, followed Create your own verbs per App on yammer.com Object Represents an instance in your App and are uniquely identified. Supported are place, person, department, team, project, folder, file, document, image, audio, video and company App Name Name of your App doing the post Message The message shown
  • 47. WWW.COLLAB365.EVENTS Open Graph - Custom • Create your own objects and verbs • Define a namespace • Object Type – Singular form – Plural form • Action types – Present tense – Past tense
  • 48. WWW.COLLAB365.EVENTS Open Graph - Custom • An Open Graph Object is posted through the activity endpoint – https://www.yammer.com/api/v1/activity.json • Example JSON payload { "activity":{ "actor":{"name":“Alexander Meijers", "email":“ameijers@portiva.nl"}, "action":"create", "object": { "url":“http://www.yammer.com", "title":“Corporate Meeting" }, "message":“Lets meet!", }
  • 50. WWW.COLLAB365.EVENTS Yammer.NET • A way to use Yammer APIs in .NET applications – Based on the .NET classes of Steve Peschka http://blogs.technet.com/b/speschka/archive/2013/10/05/using-the- yammer-api-in-a-net-client-application.aspx • Connecting to Yammer – Authentication through REST API calls by using WebRequest calls – Setting the cookies (yamtrak_id and _workfeed_session_id) • Serializing JSON data through .NET classes • Access it from – Console application – Provider hosted App in SharePoint 2013
  • 51. WWW.COLLAB365.EVENTS Takeaways & round up • Documentation is nowadays better! • The REST part is enough to create rich implementations • Use access token to use yammer APIs on behalf of an user. Valid for years. • Use Yammer Embed to create Yammer implementations quickly and with an ease • Open Graph allows you to create your own objects within your yammer implementation • Using .NET building Yammer Apps is great. Especially with an Yammer.NET Library
  • 52. WWW.COLLAB365.EVENTS Stay tuned for more great sessions …