build you own yammer app

Post on 08-May-2015

507 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

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

Build your own Yammer App

Alexander Meijers

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

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!

Yammer

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

Yammer main structure

Messages

Groups

Networks Users

Authentication

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

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

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

Yammer Apps in SharePoint

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

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

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

Yammer API

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

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

DEMO

Register a 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

REST API

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/

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

DEMO

Authentication

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

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

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

DEMO

REST API Call

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

Explain about the JSON returned

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

JavaScript SDK

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

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

DEMO

Authenticate with JavaScript SDK

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

Explained how to authenticate with JavaScript SDK

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

Yammer Embed

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

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

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

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

DEMO

Use Yammer Embed

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

Show the different embeds: Yammer feed Action buttons Commenting

Open Graph

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

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

Singular form Plural form

Action types Present tense Past tense

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":“ameijers@portiva.nl"}, "action":"create", "object": { "url":“http://www.yammer.com", "title":“Corporate Meeting" }, "message":“Lets meet!", }

DEMO

Open Graph

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

Yammer and .NET

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

DEMO

Search Yammer

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

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

THANK YOU

top related