310 likes | 511 Vues
Building Enterprise Web and Client Apps with the Yammer Platform. Neil McCarthy, Tuong La, and Jose Comboni 3-605. Yammer 101. Viral growth. Sign up for free. Grouped into private networks by email domain. Messages. Post messages in the publisher .
E N D
Building Enterprise Web and Client Apps with the Yammer Platform Neil McCarthy, Tuong La, and Jose Comboni 3-605
Viral growth • Sign up for free. • Grouped into private networks by email domain.
Messages • Post messages in the publisher. • User-generated messages appear in the feed.
Activities and objects • System generated events appear in the ticker.
Groups, Files, and Apps • Users create groups. • Users upload files. • Partners develop apps.
Enterprise Social Layer CMS CRM HR ERP SMM CSS Custom DMS
Open Graph in the Enterprise • Sign In With Yammer • Embed Yammer actions (Like and Follow) to send object metadata. • Send activities stories to send object metadata. • Why Open Graph? User growth and engagement.
Other Stuff • REST API • Data Export API • JavaScript SDK
Contract Meow for Windows 8 • Credits: • Tuong La • Jose Comboni • Xiangli Dai • Marvyn Leroy
Yammer REST API • REST API: http://en.wikipedia.org/wiki/REST • Yammer API URI: https://www.yammer.com/api/v1 • Recommended format for data exchange: JSON.
Authentication • Your application must be registered with Yammer to obtain a Client Id and Client Secret. • The Client Id and Client Secret will be used to get an access token. • The token should be kept safe as it is used for authorization for all API calls. • API calls will authenticate users through the ‘Authorization’ header ( Auth-scheme ‘Bearer’ value ‘Token’. • E.g. Authorization: Bearer ASDF252346SFGz
End Points • Autocomplete: https://www.yammer.com/api/v1/autocomplete/ • Messages: https://www.yammer.com/api/v1/messages.json • Attachments: https://www.yammer.com/api/v1/pending_attachments • Search: https://www.yammer.com/api/v1/search.json • Notifications: https://www.yammer.com/api/v1/streams/notifications.json • More: https://developer.yammer.com/restapi/
Rate Limits • Rate limits are per user per app. • There are four rate limits: • AutoComplete: 10 requests in 10 seconds. • Messages: 10 requests in 30 seconds. • Notifications: 10 requests in 30 seconds. • All Other Resources: 10 requests in 10 seconds. • Exceeding any rate limits will result in all endpoints returning a status code of 429 (Too Many Requests).
AutoComplete End Point • The autocomplete feature is useful for giving suggestions to users when they begin to type something that looks like the name of a group, user or topic. • Yammer ranks various models to provide a useful AutoComplete results. • When Implemented Auto-complete it’s recommended to start sending requests after the 4th character of a word is typed
AutoComplete End Point (cont’d) • Endpoint: https://www.yammer.com/api/v1/autocomplete/ranked • Query String Parameters: • models=modelName:count- modelNamecan be the following: • user, group, open_graph_object, department, external_network, or domain • prefix=string - A string for matching against the searchable fields in the specified models. • ?models={modelName}:{count}&prefix={string} • ?models=user:20&prefix=Matt • ?models=user:20
AutoComplete End Point (cont’d) • { "user": [ { • "id": "2022775", • "full_name": "Tuong La", • "email": "tuong@neilmccarthy-buildconference.com", • "job_title": “Mouse Gatherer", • "photo": "https://mug0.assets.yammer.com/mugshot/images/48x48/4xf...9n6f5", • }, …] }
Open Graph • Connects activities together with a common Open Graph object. • An activity takes the format: • <Actor> <Action> <Object> on <App Name>: <Message> • “John Doe” created “Sales Contract” on Contract Meow: Signed a new client! • More info at: https://developer.yammer.com/opengraph/
Activities • Use Open Graph Object Format • <Actor> <Action> <Object> on <App Name>: <Message> • Actor - The actor is the user that performed an action. • Action - The action is a verb that describes what happened to the object. • Standard actions are “created, updated, deleted, followed, and liked”. • Custom Actions can be created for your network. • Object - An OG object represents an entity instance in your application, like a particular Contract or Event (Lunch Meeting). URL is the unique identifier.
Activity Example (JSON OG representation) • { • "activity":{ • "actor":{ • "name":"JohnDoe", • "email":"john@contract-meow.com"}, • "action":"create", • "object": { • "url":"https://www.contract-meow.com/34242", • "title":"SalesContract"}, • "message":"Signed a new client! " • "users":[ • {"name":"JaneDoe", • "email":"jane@contract-meow.com"} • ] • } • }
DTOs and Models • Portable Class Library
Sched.do (a web app) • Sample App
How to get started • Sign up for Yammer with your corporate email address (not outlook.com, gmail.com, etc.) • Request access to the Yammer Developer Network (upload a photo!) • Create a Yammer app at https://www.yammer.com/client_applications • Note: Your app will only be authorize-able for you and other users in your network, until…
How to get in the App Directory • Get your app working. • Complete App Directory submission form. • Deploy to your network’s app directory. • Request global app status and app directory placement. • Chat with our Business Development team.
Developer Resources • API Docs: https://developer.yammer.com • YDN: https://www.yammer.com/yammerdevelopersnetwork • Contract Meow source (soon): https://github.com/yammer/contractmeow • Sched.do: https://www.sched.do • Sched.do source: https://github.com/yammer/sched.do • Register a new app: https://www.yammer.com/client_applications
Resources • http://dev.office.com • http://blogs.msdn.com/officeapps/ • http://social.msdn.microsoft.com/Forums/officeapps • Office, SharePoint & Yammer Sessions • Wednesday • 2:00-3:00, 3-602 0 to 60: Developing Apps for Microsoft SharePoint 2013 • 3:30-4:30, 3-603 Understanding Authentication and Permissions with Apps for SharePoint and Office • 5:00-6:00, 3-319 Developing Apps for SharePoint 2013 with Visual Studio 2013 • Thursday • 2:00-3:00, 3-601 0 to 60: Developing Apps for Microsoft Office 2013 • Friday • 10:30-11:30, 3-604 Advanced Patterns Using Windows Azure Web Sites for Apps for Office and SharePoint • 2:00-3:00, 3-605 Building Enterprise Web and Mobile Apps with the Yammer Platform
Required Slide *delete this box when your slide is finalized Your MS Tag will be inserted here during the final scrub. Evaluate this session • Scan this QR codeto evaluate this session and be automatically entered in a drawing to win a prize!