Intro to SharePoint's Social APIs - SharePoint Sat NYC 2013
Upcoming SlideShare
Loading in...5
×
 

Intro to SharePoint's Social APIs - SharePoint Sat NYC 2013

on

  • 727 views

Developer's introduction to the SharePoint Social APIs including the client side object models, REST and oData, and Server object model.

Developer's introduction to the SharePoint Social APIs including the client side object models, REST and oData, and Server object model.

Statistics

Views

Total Views
727
Views on SlideShare
653
Embed Views
74

Actions

Likes
0
Downloads
13
Comments
0

3 Embeds 74

http://lanyrd.com 50
https://twitter.com 18
http://mikeoryszak.com 6

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Social Namespace: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.social.aspxUserProfiles Namespace: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.userprofiles.aspx
  • Social Namespace: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.social.aspxUserProfiles Namespace: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.userprofiles.aspx
  • JS Client OM: http://msdn.microsoft.com/en-us/library/jj193045.aspx
  • JS Client OM: http://msdn.microsoft.com/en-us/library/jj193045.aspxhttp://msdn.microsoft.com/en-us/library/jj642945.aspx
  • http://msdn.microsoft.com/en-us/library/jj822974.aspx
  • http://msdn.microsoft.com/en-us/library/jj193058.aspx#SPNETServerlanding_SocialSocial Classes: http://msdn.microsoft.com/en-us/library/jj193040.aspxWork with Social Feeds in SharePoint 2013: http://msdn.microsoft.com/en-us/library/jj163237.aspx
  • http://msdn.microsoft.com/en-us/library/jj193058.aspx#SPNETServerlanding_SocialSocial Classes: http://msdn.microsoft.com/en-us/library/jj193040.aspxWork with Social Feeds in SharePoint 2013: http://msdn.microsoft.com/en-us/library/jj163237.aspx

Intro to SharePoint's Social APIs - SharePoint Sat NYC 2013 Intro to SharePoint's Social APIs - SharePoint Sat NYC 2013 Presentation Transcript

  • SPSNYC 2013 Intro to SharePoint’s Social APIs SHAREPOINT SATURDAY NYC– JULY 27, 2013 MIKE ORYSZAK BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK
  • SPSNYC 2013 About Me Senior SharePoint Solution Architect w/ B&R Solutions Microsoft SharePoint Server MVP Leader for Triangle SharePoint User Group (TriSPUG) Dev and Architect with MS stack since 1996 Working with SharePoint since 2002 Raleigh-Durham, NC BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 2
  • SPSNYC 2013 3 | SharePoint Saturday New York City 2013 Housekeeping Please remember to turn in your filled out bingo cards and event evaluations for prizes. SharePint is sponsored by Slalom at Whiskey Trader (Between 55th and 56th on 6th Avenue). Follow SharePoint Saturday New York City on Twitter @spsnyc and hashtag #spsnyc
  • Thanks to Our Sponsors!
  • SPSNYC 2013 Session Overview Feature Overview API Options Examples Closeout Target Audience: Developers looking to leverage or extend SharePoint’s Social Features. BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 5
  • SPSNYC 2013 Feature Overview INTRO TO SHAREPOINT’S SOCIAL APIS BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 6
  • SPSNYC 2013 Feature Overview Social Platform MySite Host: Centralized Site Collection that supports Newsfeed – Functions as a social hub About Me (Profile) Page – Displays information about the person, their expertise, and social activities Personal Site: Individual Site Collections that contain Documents (personal and shared) Blog Tasks Apps Version Differences: In 2010  Newsfeed was pretty light; could not take action on messages  About Me page less focused on social, more focused on organization In 2013  Newsfeed supports replies, likes, mentioning people.  Newsfeed can function more like a social hub for things you are following. Ex. People, Documents, Sites, Tags BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 7
  • SPSNYC 2013 Feature Overview Social Content Social Content Conversations Tags/hashtags Notes Ratings Version Differences: In 2010 Newsfeed was pretty light; could not take action on messages In 2013 Newsfeed extended to support conversations including replies, likes, mentioning people. Newsfeed can function more like a social hub for things you are following. Ex. People, Documents, Sites, Tags BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 8
  • SPSNYC 2013 API Options INTRO TO SHAREPOINT’S SOCIAL APIS BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 9
  • SPSNYC 2013 Social API Options Multiple Options for interacting with social data and features. Ranked in recommended order of preference: Client Object Model for managed code (.NET, Silverlight, Mobile) Client Object Model for JavaScript Rest and OData Server Object model Soap based Web Services BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 10
  • SPSNYC 2013 Social API Options Client Object Model – Managed Code This is Microsoft’s recommended approach Provides a wrapper for the REST based services Used within the new SharePoint Apps or non-SharePoint Apps not running for the server Namespaces: Microsoft.SharePoint.Client.Social Core objects for interacting with social feeds, posts, and following data Microsoft.SharePoint.Client.UserProfiles Contains objects for interacting with user profiles and attributes BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 11
  • SPSNYC 2013 Social API Options Client Object Model – Managed Code Differs from Server OM in that it requires a Client Context and cannot hold an open connection Quick Example – Load a User Profile string spUrl = "http://serverName/"; string user = "domainNameuserName"; ClientContext context = new ClientContext(spUrl); PeopleManager peopleManager = new PeopleManager(context); PersonProperties props = peopleManager.GetPropertiesFor(user); clientContext.Load(props, p => p.AccountName, p => p.UserProfileProperties); clientContext.ExecuteQuery(); string email = props.UserProfileProperties["Email"].ToString(); string department = props.UserProfileProperties["Department"].ToString(); BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 12
  • SPSNYC 2013 Social API Options Client Object Model – JavaScript Great for client-side customizations inside of SharePoint or externally This is the equivalent of what was previously accomplished with SPServices Namespaces: SP.Sharing (/_layouts/sp.js) Contains objects for interacting with the sharing features SP.Social (/_layouts/sp.userprofiles.js) Core objects for interacting with social feeds, posts, and following data SP.UserProfiles (/_layouts/sp.userprofiles.js) Contains objects for interacting with user profiles and attributes BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 13
  • SPSNYC 2013 Social API Options Client Object Model – JavaScript Similar to Client OM in that it requires a Client Context and cannot hold an open connection Quick Example – Load a User Profile var spUrl = "http://serverName/"; var acctName = "domainNameuserName"; var context = new SP.ClientContext(spUrl); var peopleManager = new SP.UserProfiles.PeopleManager(context); var profilePropertyNames = ["Email", "Department", “Title”]; var userProperties = new SP.UserProfiles.UserProfilePropertiesForUser(context, acctName, profilePropertyNames); var props = peopleManager. getUserProfilePropertiesFor(userProperties); context.load(userProperties); context.executeQueryAsync( function () { "Email:" + alert(props[0] + " | Department: " + props[1] + " | Title: " + props[2]); }, function () { alert("Error Loading User Profile") }); BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 14
  • SPSNYC 2013 Social API Options REST and OData The data is also available directly via the underlying REST services These can be accessed from any language REST Endpoints Social Feed: http://<mySiteUri>/_api/social.feed Read or write to a user’s social feed Social Following: http://<mySiteUri>/_api/social.following Read or write following information People Manager: http://<siteUri>/_api/SP.UserProfiles.PeopleManager Read or write user profile information BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 15
  • SPSNYC 2013 Social API Options Server Object Model Full featured, and traditional developers are most comfortable here Requires deployment through full trust, server solutions Social Namespaces: Microsoft.Office.Server.Social: Core objects for interacting with social feeds, posts, and following data Microsoft.Office.Server.SocialData: Core objects for interacting with social data such as tags and ratings Microsoft.Office.Server.UserProfiles: Contains objects for interacting with user profiles and attributes BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 16
  • SPSNYC 2013 Social API Options Server Object Model One difference with the Server OM is that it requires a Service Context to connect to the appropriate User Profile Service Application. Quick Example – Load a User Profile SPContext context = SPContext.Current; string accountname = "domainNameuserName"; SPServiceContext svcContext = SPServiceContext.GetContext(context.Site); UserProfileManager profileManager = new UserProfileManager(svcContext); UserProfile profile = profileManager.GetUserProfile(accountname); string email = profile["Email"].Value; BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 17
  • SPSNYC 2013 Social API Options Soap Based Web Service API These have officially been deprecated with SharePoint 2013. Previously released services still available, but no new investment. Migrate to another API BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 18
  • SPSNYC 2013 Examples INTRO TO SHAREPOINT’S SOCIAL APIS BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 19
  • SPSNYC 2013 Examples Demonstration .NET Client OM Read Profile Properties Access Tags/Note Data Server OM Read Profile Properties BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 20
  • SPSNYC 2013 Closeout INTRO TO SHAREPOINT’S SOCIAL APIS BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 22
  • SPSNYC 2013 Questions? BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 23
  • SPSNYC 2013 Resources MSDN API References Choose the right API http://msdn.microsoft.com/en-us/library/jj164060.aspx Server Object Model http://msdn.microsoft.com/en-us/library/jj193040.aspx Client Object Model .Net Client: http://msdn.microsoft.com/en- us/library/jj193046.aspx Javascript: http://msdn.microsoft.com/en- us/library/jj193045.aspx http://msdn.microsoft.com/en- us/library/microsoft.sharepoint.client.social.aspx My Social Blog Posts http://mikeoryszak.com/tag/social/ Sample Projects http://mikeoryszak.com/wp- content/uploads/2013/06/SPBlueprints.SocialEx amples.ClientOM.zip http://mikeoryszak.com/wp- content/uploads/2013/06/SPBlueprints.SocialEx amples.ServerOM.zip http://mikeoryszak.com/wp- content/uploads/2013/06/SPBlueprints.OutofOff iceDelegation-2013.zip LinkPad  http://www.linqpad.net/ BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 24