SlideShare a Scribd company logo
SPSATL 2013
Intro to SharePoint’s
Social APIs
SHAREPOINT SATURDAY ATLANTA – JUNE 8, 2013
MIKE ORYSZAK
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK
SPSATL 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
Scan the QR code for a
chance to win a prize!
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK
2
3 |SharePoint Saturday Atlanta3 |SharePoint Saturday Atlanta
4 |SharePoint Saturday Atlanta4 |SharePoint Saturday Atlanta
5 |SharePoint Saturday Atlanta5 |SharePoint Saturday Atlanta
6 |SharePoint Saturday Atlanta6 |SharePoint Saturday Atlanta
SPSATL 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
7
SPSATL 2013
Feature Overview
INTRO TO SHAREPOINT’S SOCIAL APIS
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK
8
SPSATL 2013SPSATL 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
9
SPSATL 2013SPSATL 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
10
SPSATL 2013
API Options
INTRO TO SHAREPOINT’S SOCIAL APIS
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK
11
SPSATL 2013SPSATL 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
12
SPSATL 2013SPSATL 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
13
SPSATL 2013SPSATL 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
14
SPSATL 2013SPSATL 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
15
SPSATL 2013SPSATL 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
16
SPSATL 2013SPSATL 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
17
SPSATL 2013SPSATL 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
18
SPSATL 2013SPSATL 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
19
SPSATL 2013SPSATL 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
20
SPSATL 2013
Examples
INTRO TO SHAREPOINT’S SOCIAL APIS
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK
21
SPSATL 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
22
SPSATL 2013
Closeout
INTRO TO SHAREPOINT’S SOCIAL APIS
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK
24
SPSATL 2013
Questions?
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK
25
SPSATL 2013SPSATL 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
A
B
C
LinkPad
 http://www.linqpad.net/
BLOG: WWW.MIKEORYSZAK.COM
TWITTER: @NEXT_CONNECT
LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK
26
 @SPS_ATL #SPSATL
 speaker sponsor

Session Prizes
1 4 $25 gift cards
2 4 $25 gift cards
3 4 $25 gift cards
4 4 $25 gift cards
5 4 $25 gift cards

More Related Content

PDF
Sharepoint Basics
PPTX
Spsatl2013 Displaying Dynamic Content With SharePoint Search
PPTX
Displaying Dynamic Content in SharePoint with Search
PPTX
Developing SP 2013 Display Templates
PPTX
Create Tailored Search Results through Customized Display Templates
PPTX
Dynamic Content using Search - SPS Nashville
PPTX
Intro to SharePoint's Social APIs - SharePoint Sat NYC 2013
PDF
SharePoint - Empower People and Stay in Control - Atidan
Sharepoint Basics
Spsatl2013 Displaying Dynamic Content With SharePoint Search
Displaying Dynamic Content in SharePoint with Search
Developing SP 2013 Display Templates
Create Tailored Search Results through Customized Display Templates
Dynamic Content using Search - SPS Nashville
Intro to SharePoint's Social APIs - SharePoint Sat NYC 2013
SharePoint - Empower People and Stay in Control - Atidan

What's hot (20)

PPTX
Sharepoint overview
PPTX
Exam Cram for 70-488: Developing Microsoft SharePoint Server 2013 Core Solutions
PPTX
SharePoint for Project Management (2016)
PDF
7 Ways To Leverage SharePoint for Project Management Success
PPTX
10 SharePoint 2013 OOTB Solutions Every Power User Should Know
PPT
Web 2.0: What Can It Offer The Research Community?
PPTX
Social computing with share point 2010
PDF
Introduction to SharePoint Information Architecture
PPTX
From Trashy to Classy: How The SharePoint 2013 App Model Changes Everything
PDF
Introduction to SharePoint 2013 Out of the box Webparts
PPTX
SharePoint Training
PPTX
Becoming a SharePoint Design Ninja
PPTX
Intro to Delve - SPSATL 2016
PDF
Aiimi Project Management Office
PPTX
Sharepoint Document Management System (DMS) Features
PPTX
SPS South Florida BCS Deck
PDF
SharePoint Power User (Site Owner) Training
PDF
Microsoft Certified Professional
PDF
Understand the SharePoint Basics
PDF
Don't Suck at SharePoint - Avoid the common mistakes
Sharepoint overview
Exam Cram for 70-488: Developing Microsoft SharePoint Server 2013 Core Solutions
SharePoint for Project Management (2016)
7 Ways To Leverage SharePoint for Project Management Success
10 SharePoint 2013 OOTB Solutions Every Power User Should Know
Web 2.0: What Can It Offer The Research Community?
Social computing with share point 2010
Introduction to SharePoint Information Architecture
From Trashy to Classy: How The SharePoint 2013 App Model Changes Everything
Introduction to SharePoint 2013 Out of the box Webparts
SharePoint Training
Becoming a SharePoint Design Ninja
Intro to Delve - SPSATL 2016
Aiimi Project Management Office
Sharepoint Document Management System (DMS) Features
SPS South Florida BCS Deck
SharePoint Power User (Site Owner) Training
Microsoft Certified Professional
Understand the SharePoint Basics
Don't Suck at SharePoint - Avoid the common mistakes
Ad

Viewers also liked (18)

PDF
ATLSPUG - SharePoint Branding Best Bets
PPTX
Spsnyc 2016 JSLink Primer
PDF
SharePoint Branding Best Bets (SharePoint Saturday Richmond, 2013)
PPT
Sambit's quiz. Quiz meet 18th sept
PPTX
CE 150210107029 PRESENTATION
PPTX
10 ways big data will accelerate your marketing & sales pipeline performance
PPTX
Didactica.
PDF
We can do Facebook marketing differently!
PDF
An overview of Tapit.
PDF
الأستاذ والشيخ حسنين الديب
PDF
5 Reasons Why Small Businesses Fear Obamacare
PDF
Leveraging social media for pharmaceutical companies
DOCX
Impacto de las tic en las educacion
DOC
Minder jaar voor firma van Marcel Vanthilt
PPTX
PDF
Market Research Finland - Biofuels Market in Finland 2009
PDF
Lean UX in Startups - Agile Experience Design Meetup
PDF
Immutability FTW!
ATLSPUG - SharePoint Branding Best Bets
Spsnyc 2016 JSLink Primer
SharePoint Branding Best Bets (SharePoint Saturday Richmond, 2013)
Sambit's quiz. Quiz meet 18th sept
CE 150210107029 PRESENTATION
10 ways big data will accelerate your marketing & sales pipeline performance
Didactica.
We can do Facebook marketing differently!
An overview of Tapit.
الأستاذ والشيخ حسنين الديب
5 Reasons Why Small Businesses Fear Obamacare
Leveraging social media for pharmaceutical companies
Impacto de las tic en las educacion
Minder jaar voor firma van Marcel Vanthilt
Market Research Finland - Biofuels Market in Finland 2009
Lean UX in Startups - Agile Experience Design Meetup
Immutability FTW!
Ad

Similar to Spsatl2013 Introduction to the SharePoint's Social APIs (20)

PPTX
Social Architecture of SharePoint 2013 for Developers
PPTX
Beyond Social
PPTX
Developing social solutions on Microsoft technologies (SP Social and Yammer)
PPTX
Developing social solutions on Microsoft technologies (SP Social and Yammer)
PPTX
Msol10 extending social features in share point 2010 v0.4
PPTX
Beyond Social – Tailor SharePoint 2013 Social features according to your need...
PPTX
SharePoint and Office Development Workshop
PPTX
Social features sp2013
PPTX
SharePoint 2013 APIs demystified
PDF
Open social & cmis oasistc-20100712
PPTX
Rest API and Client OM for Developer
PPT
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
PDF
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
PPT
1309 leveraging social business data visualizing the connections org structure
PPTX
SharePoint Conference North America - Converting your JavaScript to SPFX
PPTX
Grow your SharePoint development platform with SPFx
PDF
SharePoint as a Complete Social Intranet
PPTX
Grow your SharePoint development platform with SharePoint Framework
PPTX
SharePoint Fest Seattle 2017 - Everything your need to know about the Microso...
PPTX
Uncovering the Latest in SharePoint Development
Social Architecture of SharePoint 2013 for Developers
Beyond Social
Developing social solutions on Microsoft technologies (SP Social and Yammer)
Developing social solutions on Microsoft technologies (SP Social and Yammer)
Msol10 extending social features in share point 2010 v0.4
Beyond Social – Tailor SharePoint 2013 Social features according to your need...
SharePoint and Office Development Workshop
Social features sp2013
SharePoint 2013 APIs demystified
Open social & cmis oasistc-20100712
Rest API and Client OM for Developer
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
1309 leveraging social business data visualizing the connections org structure
SharePoint Conference North America - Converting your JavaScript to SPFX
Grow your SharePoint development platform with SPFx
SharePoint as a Complete Social Intranet
Grow your SharePoint development platform with SharePoint Framework
SharePoint Fest Seattle 2017 - Everything your need to know about the Microso...
Uncovering the Latest in SharePoint Development

More from Michael Oryszak (20)

PPTX
Xtending nintex workflow cloud w azure functions - xchange conference
PPTX
Making Workflow Automation Personal: The Next Step in Digital Transformation...
PPTX
Making Workflow Automation Personal: Next Step in Digital Transformation (SP...
PPTX
Making Workflow Automation Personal: The Next Step in Digital Transformation...
PPTX
Using Search to Unlock the Value of your Content - SPEngage2016
PPTX
Unlock the Value of your Content with Optimized Search Results - SPS NYC
PPTX
Optimize Search Results
PPTX
Create Tailored Search Results through Customized Display Templates
PPTX
Unlocking the Power of SharePoint Search
PPTX
Developer FAST Queries (SPS NY)
PPTX
Developing FAST Queries - SPSATL
PPTX
Keys to SharePoint Search - SPS Philly
PPTX
Developing Reusable Workflow Features (SPSVB)
PPTX
How Many Sites Do I Need? (SPSVB)
PPTX
Developing Reusable Workflow Features (SPS Richmond)
PPTX
CASPUG - Developing Reusable Workflow Features
PPTX
Spstc2011 Getting the Most from SharePoint's User Profiles
PPTX
Spstc2011 Developing Reusable Workflow Features
PPTX
Getting the Most from SharePoint's User Profiles
PPTX
Getting the Most from SharePoint's User Profiles
Xtending nintex workflow cloud w azure functions - xchange conference
Making Workflow Automation Personal: The Next Step in Digital Transformation...
Making Workflow Automation Personal: Next Step in Digital Transformation (SP...
Making Workflow Automation Personal: The Next Step in Digital Transformation...
Using Search to Unlock the Value of your Content - SPEngage2016
Unlock the Value of your Content with Optimized Search Results - SPS NYC
Optimize Search Results
Create Tailored Search Results through Customized Display Templates
Unlocking the Power of SharePoint Search
Developer FAST Queries (SPS NY)
Developing FAST Queries - SPSATL
Keys to SharePoint Search - SPS Philly
Developing Reusable Workflow Features (SPSVB)
How Many Sites Do I Need? (SPSVB)
Developing Reusable Workflow Features (SPS Richmond)
CASPUG - Developing Reusable Workflow Features
Spstc2011 Getting the Most from SharePoint's User Profiles
Spstc2011 Developing Reusable Workflow Features
Getting the Most from SharePoint's User Profiles
Getting the Most from SharePoint's User Profiles

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Network Security Unit 5.pdf for BCA BBA.
Unlocking AI with Model Context Protocol (MCP)
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Programs and apps: productivity, graphics, security and other tools
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Review of recent advances in non-invasive hemoglobin estimation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Per capita expenditure prediction using model stacking based on satellite ima...
The AUB Centre for AI in Media Proposal.docx
Dropbox Q2 2025 Financial Results & Investor Presentation
Digital-Transformation-Roadmap-for-Companies.pptx

Spsatl2013 Introduction to the SharePoint's Social APIs

  • 1. SPSATL 2013 Intro to SharePoint’s Social APIs SHAREPOINT SATURDAY ATLANTA – JUNE 8, 2013 MIKE ORYSZAK BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK
  • 2. SPSATL 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 Scan the QR code for a chance to win a prize! BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 2
  • 3. 3 |SharePoint Saturday Atlanta3 |SharePoint Saturday Atlanta
  • 4. 4 |SharePoint Saturday Atlanta4 |SharePoint Saturday Atlanta
  • 5. 5 |SharePoint Saturday Atlanta5 |SharePoint Saturday Atlanta
  • 6. 6 |SharePoint Saturday Atlanta6 |SharePoint Saturday Atlanta
  • 7. SPSATL 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 7
  • 8. SPSATL 2013 Feature Overview INTRO TO SHAREPOINT’S SOCIAL APIS BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 8
  • 9. SPSATL 2013SPSATL 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 9
  • 10. SPSATL 2013SPSATL 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 10
  • 11. SPSATL 2013 API Options INTRO TO SHAREPOINT’S SOCIAL APIS BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 11
  • 12. SPSATL 2013SPSATL 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 12
  • 13. SPSATL 2013SPSATL 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 13
  • 14. SPSATL 2013SPSATL 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 14
  • 15. SPSATL 2013SPSATL 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 15
  • 16. SPSATL 2013SPSATL 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 16
  • 17. SPSATL 2013SPSATL 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 17
  • 18. SPSATL 2013SPSATL 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 18
  • 19. SPSATL 2013SPSATL 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 19
  • 20. SPSATL 2013SPSATL 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 20
  • 21. SPSATL 2013 Examples INTRO TO SHAREPOINT’S SOCIAL APIS BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 21
  • 22. SPSATL 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 22
  • 23. SPSATL 2013 Closeout INTRO TO SHAREPOINT’S SOCIAL APIS BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 24
  • 24. SPSATL 2013 Questions? BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 25
  • 25. SPSATL 2013SPSATL 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 A B C LinkPad  http://www.linqpad.net/ BLOG: WWW.MIKEORYSZAK.COM TWITTER: @NEXT_CONNECT LINKEDIN: HTTP://WWW.LINKEDIN.COM/IN/MICHAELORYSZAK 26
  • 26.  @SPS_ATL #SPSATL  speaker sponsor  Session Prizes 1 4 $25 gift cards 2 4 $25 gift cards 3 4 $25 gift cards 4 4 $25 gift cards 5 4 $25 gift cards

Editor's Notes

  • #14: 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
  • #15: 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
  • #16: JS Client OM: http://msdn.microsoft.com/en-us/library/jj193045.aspx
  • #17: JS Client OM: http://msdn.microsoft.com/en-us/library/jj193045.aspxhttp://msdn.microsoft.com/en-us/library/jj642945.aspx
  • #18: http://msdn.microsoft.com/en-us/library/jj822974.aspx
  • #19: 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
  • #20: 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
  • #28: Grand Prize winner selectedfrom session winners