0
SPSNYC 2013
Intro to SharePoint’s
Social APIs
SHAREPOINT SATURDAY NYC– JULY 27, 2013
MIKE ORYSZAK
BLOG: WWW.MIKEORYSZAK.CO...
SPSNYC 2013
About Me
Senior SharePoint Solution Architect w/ B&R Solutions
Microsoft SharePoint Server MVP
Leader for T...
SPSNYC 2013 3 | SharePoint Saturday New York City 2013
Housekeeping
Please remember to turn in your filled out bingo
cards...
Thanks to Our Sponsors!
SPSNYC 2013
Session
Overview
Feature Overview
API Options
Examples
Closeout
Target Audience:
Developers looking to lev...
SPSNYC 2013
Feature Overview
INTRO TO SHAREPOINT’S SOCIAL APIS
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: ...
SPSNYC 2013
Feature Overview
Social Platform
MySite Host: Centralized Site Collection that supports
Newsfeed – Functions...
SPSNYC 2013
Feature Overview
Social Content
Social Content
Conversations
Tags/hashtags
Notes
Ratings
Version Differe...
SPSNYC 2013
API Options
INTRO TO SHAREPOINT’S SOCIAL APIS
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: HTTP:...
SPSNYC 2013
Social API Options
Multiple Options for interacting with social data and features.
Ranked in recommended ord...
SPSNYC 2013
Social API Options
Client Object Model – Managed
Code
This is Microsoft’s recommended approach
Provides a wr...
SPSNYC 2013
Social API Options
Client Object Model – Managed
Code
Differs from Server OM in that it requires a Client Con...
SPSNYC 2013
Social API Options
Client Object Model – JavaScript
Great for client-side customizations inside of SharePoint...
SPSNYC 2013
Social API Options
Client Object Model – JavaScript
Similar to Client OM in that it requires a Client Context...
SPSNYC 2013
Social API Options
REST and OData
The data is also available directly via the underlying REST services
These...
SPSNYC 2013
Social API Options
Server Object Model
Full featured, and traditional developers are most comfortable here
R...
SPSNYC 2013
Social API Options
Server Object Model
One difference with the Server OM is that it requires a Service Contex...
SPSNYC 2013
Social API Options
Soap Based Web Service API
These have officially been deprecated with SharePoint 2013.
Pr...
SPSNYC 2013
Examples
INTRO TO SHAREPOINT’S SOCIAL APIS
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: HTTP://W...
SPSNYC 2013
Examples
Demonstration
.NET Client OM
Read Profile Properties
Access Tags/Note Data
Server OM
Read Profi...
SPSNYC 2013
Closeout
INTRO TO SHAREPOINT’S SOCIAL APIS
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: HTTP://W...
SPSNYC 2013
Questions?
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZA...
SPSNYC 2013
Resources
MSDN API References
Choose the right API
http://msdn.microsoft.com/en-us/library/jj164060.aspx
S...
Upcoming SlideShare
Loading in...5
×

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

768

Published on

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
768
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • 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
  • Transcript of "Intro to SharePoint's Social APIs - SharePoint Sat NYC 2013"

    1. 1. 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
    2. 2. 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
    3. 3. 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
    4. 4. Thanks to Our Sponsors!
    5. 5. 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
    6. 6. 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
    7. 7. 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
    8. 8. 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
    9. 9. 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
    10. 10. 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
    11. 11. 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
    12. 12. 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
    13. 13. 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
    14. 14. 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
    15. 15. 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
    16. 16. 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
    17. 17. 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
    18. 18. 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
    19. 19. SPSNYC 2013 Examples INTRO TO SHAREPOINT’S SOCIAL APIS BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 19
    20. 20. 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
    21. 21. SPSNYC 2013 Closeout INTRO TO SHAREPOINT’S SOCIAL APIS BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 22
    22. 22. SPSNYC 2013 Questions? BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 23
    23. 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
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×