build you own yammer app

56
Build your own Yammer App Alexander Meijers

Upload: alexander-meijers

Post on 08-May-2015

506 views

Category:

Software


0 download

DESCRIPTION

Currently Yammer integration is handled by a SharePoint App in SharePoint Online and in on premise environments. What if you want to create your own Yammer App? What do you need to know and how can you achieve this? During this session I will get into some of the basic knowledge of how Yammer works and explain which steps you need to take to build your own Yammer App based on a real life examples

TRANSCRIPT

Page 1: Build you own yammer app

Build your own Yammer App

Alexander Meijers

Page 2: Build you own yammer app

About me Name: Alexander Meijers

Workplace: Portiva Role: SharePoint Lead Architect Experience: 10+ Years SharePoint (2003/2007/2010/2013) SharePoint Enthusiast Projects: Internet facing websites, Intranet design,

Architecture, Migration, Advisory on infrastructure, development and projects.

Follow me on twitter: @ameijers Check out my blog:

http://www.sharepointinspiration.com

Page 3: Build you own yammer app

Agenda Yammer

What is Yammer? Structure of Yammer Current integration with SharePoint

Yammer Apps Yammer Apps in SharePoint REST API JavaScript SDK Yammer Embed Open Graph Takeaways & round up

Demos as we go on!

Page 4: Build you own yammer app

Yammer

Page 5: Build you own yammer app

What is Yammer? It allows organizations to extend their systems socially by using one or more social networks

Create communities around content Only people with same domain as email can access the internal network External networks have the ability to invite external users

What can you do? Send and receive messages Show activity around objects Follow and like messages, topics and other information

Page 6: Build you own yammer app

Yammer main structure

Messages

Groups

Networks Users

Authentication

Page 7: Build you own yammer app
Page 8: Build you own yammer app

VersionsBasic

(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

Page 9: Build you own yammer app

Roles and permissionsMember 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.

More information http://www.collabshow.com/2014/01/06/yammer-roles-permissions-drill-down

Page 10: Build you own yammer app

Current integration with SharePoint Yammer Web Part

Yammer feeds, private messages and notifications Embeddable feeds Activity streams Admin configurations

Integration with documents and lists

Federated search Single Sign On

More information http://support.microsoft.com/kb/2835453

Page 11: Build you own yammer app

Yammer Apps in SharePoint

Page 12: Build you own yammer app

What are the possibilities? Embedding code directly on Page

Publishing Page, Content Page, Any Page

User Control Web Part SharePoint App

SharePoint hosted App, Provider-hosted App

Page 13: Build you own yammer app

SharePoint Apps explained

SharePointWeb

On-premise

SharePoint

SharePointWeb

Azure

Parent Web

(Host)

App Web

Provider-Hosted AppUse your own server hosting architecture

Autohosted AppWindows Azure + SQL Azure provisioned inivisibly as apps are installed(DEPRECATED!!!)

Cloud-based AppsThe app runs in a separate hostOr as a service

SharePoint-Hosted AppCreation of isolated sub web on a parent webContains only web elementsExamples are lists, out-of-the box Web PartsNo server code allowed, only client JavaScript for logic and UX

Page 14: Build you own yammer app

Best practices - APIsEmbed code on

page

User Control

Web Part

SharePoint-Hosted

App

Provider-Hosted

App

Yammer Embed

Yes Yes Yes

Yes, with some exceptions as

like, follow and commenting

No

Yammer JS SDK

No Yes Yes Yes No

REST API

NoYes,

using .NET code

Yes, using .NET

code

Yes, only through

JavaScript calls

Yes, using .NET

code

Page 15: Build you own yammer app

Yammer API

Page 16: Build you own yammer app

Yammer API overview Documentation

Documentation is rather limited. http://developer.yammer.com

Available APIs REST API JavaScript SDK Other SDKs for iOS, Windows Phone, Ruby and Python

Widgets with Yammer Embed Yammer uses the Open Graph protocol for activities <Actor> <Action> <Object> on <App Name> : <Message>

Data returned JSON (the way to go!) XML

Page 17: Build you own yammer app

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 = 8dLIaFanMB6SjDg31nI1LA Client Secret = dXHD9f0hGYG0I268rtgnJNuUaq8j3FYStUqelVHKKwg

Define a redirect URL Expected Redirect = http://www.yammer.com

Page 18: Build you own yammer app

DEMO

Register a Yammer App

Page 19: Build you own yammer app

Demo – Round up Registration of a Yammer App

Use it for creating a test app to work on

Publishing for use by others

Page 20: Build you own yammer app

REST API

Page 21: Build you own yammer app

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 http://developer.yammer.com/restapi/

Page 24: Build you own yammer app

REST API - Authenticate Get your Access Token

https://www.yammer.com/dialog/oauth?client_id=8dLIaFanMB6SjDg31nI1LA&redirect_uri=http://www.yammer.com&response_type=token

Get access token from redirected URL https://www.yammer.com/portiva.nl/#access_token=qE3mHnueSIhBDV7B3S5zQ

Access token is valid for many years or longer

Page 25: Build you own yammer app

DEMO

Authentication

Page 26: Build you own yammer app

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

Page 27: Build you own yammer app

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 networks

Page 28: Build you own yammer app

REST API – Interesting EndpointsEndpoints Paramete

rs

Messageshttps://www.yammer.com/api/v1/messages.jsonhttps://www.yammer.com/api/v1/messages/following.jsonhttps://www.yammer.com/api/v1/messages/private.json

older_thannewer_thanthreadedlimit

Usershttps://www.yammer.com/api/v1/users/current.jsonhttps://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

searchpagenum_per_page

Page 29: Build you own yammer app

DEMO

REST API Call

Page 30: Build you own yammer app

Demo – Round up Use REST API to get information about the current user and messages

Explain about the JSON returned

Page 31: Build you own yammer app

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 http://developer.yammer.com/restapi/#rest-ratelimits

Requests Per Seconds

Messages 10 30

Notifications 10 30

Autocomplete 10 10

All other resources 10 10

Page 32: Build you own yammer app

JavaScript SDK

Page 33: Build you own yammer app

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://assets.yammer.com/assets/platform_js_sdk.js Enter your Yammer App ID in the data-app-id parameter

Page 34: Build you own yammer app

JavaScript SDK- Authenticate Authentication is handled for you A cool Yammer login button

Page 35: Build you own yammer app

DEMO

Authenticate with JavaScript SDK

Page 36: Build you own yammer app

Demo – Round up Use the script and data-app-id to connect to your Yammer app

Explained how to authenticate with JavaScript SDK

Page 37: Build you own yammer app

JavaScript SDK- Access data Make calls directly to the Yammer REST API Use yam.platform.request

Page 38: Build you own yammer app

Yammer Embed

Page 39: Build you own yammer app

Yammer Embed A set of widgets to quickly create Yammer implementations

Not many customizations possible Widgets

Yammer Feeds Action buttons Commenting

Widget is block of script placed in: Content Editor Web Part Page SharePoint Hosted App

Page 40: Build you own yammer app

Yammer Embed – Feed widget Type of feeds

Group, Open Graph, Users, Topics, My feed

Embed script generation https://www.yammer.com/widget/configure

Support for Single Sign On Only with an Enterprise edition

Page 41: Build you own yammer app

Yammer Embed – Action 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

Page 42: Build you own yammer app

Yammer Embed – Commenting Actually a Feed widget of the type “Open Graph”

Can be used as commenting system for internal blogs and content pages

OG Object is created by the first user using it URL and OG metadata of page is used

Page 43: Build you own yammer app

DEMO

Use Yammer Embed

Page 44: Build you own yammer app

Demo – Round up Explained the way how to use Yammer Embed

Show the different embeds: Yammer feed Action buttons Commenting

Page 45: Build you own yammer app

Open Graph

Page 46: Build you own yammer app

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!

DescriptionActor 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

Page 47: Build you own yammer app

Open Graph – Custom Create your own objects and verbs Define a namespace Object Type

Singular form Plural form

Action types Present tense Past tense

Page 48: Build you own yammer app

Open Graph – Post 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":“[email protected]"}, "action":"create", "object": { "url":“http://www.yammer.com", "title":“Corporate Meeting" }, "message":“Lets meet!", }

Page 49: Build you own yammer app

DEMO

Open Graph

Page 50: Build you own yammer app

Demo – Round up Explained how to create your own Open Graph object and action types

Page 51: Build you own yammer app

Yammer and .NET

Page 52: Build you own yammer app

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

Page 53: Build you own yammer app

DEMO

Search Yammer

Page 54: Build you own yammer app

Demo – Round up Using the Yammer.NET classes to access the search API of yammer

Connecting it to Page fields on which the app is placed

Page 55: Build you own yammer app

Takeaways & round up Documentation is limited. 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, but only available as provider-hosted app

Page 56: Build you own yammer app

THANK YOU