making applications social with the chatter api
DESCRIPTION
Chatter and the Chatter REST API can help you simplify the process of building social apps,including intranets, portals, and custom mobile apps.More details here: http://wiki.developerforce.com/page/Webinar:_ChatterAPI12TRANSCRIPT
![Page 1: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/1.jpg)
Follow us @forcedotcom
Making your Application Social
with the Chatter API
Logan Henriquez
Product Manager
@loganh
Quinton Wall
Developer Evangelist
@quintonwall
![Page 2: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/2.jpg)
Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may
contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such
uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc.
could differ materially from the results expressed or implied by the forward-looking statements we make. All
statements other than statements of historical fact could be deemed forward-looking, including any
projections of subscriber growth, earnings, revenues, or other financial items and any statements regarding
strategies or plans of management for future operations, statements of belief, any statements concerning
new, planned, or upgraded services or technology developments and customer contracts or use of our
services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with
developing and delivering new functionality for our service, our new business model, our past operating
losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web
hosting, breach of our security measures, the immature market in which we operate, our relatively limited
operating history, our ability to expand, retain, and motivate our employees and manage our growth, new
releases of our service and successful customer deployment, and utilization and selling to larger enterprise
customers. Further information on potential factors that could affect the financial results of salesforce.com,
inc. is included in our annual report on Form 10-K filed on April 30, 2008 and in other filings with the
Securities and Exchange Commission. These documents are available on the SEC Filings section of the
Investor Information section of our Web site.
Any unreleased services or features referenced in this or other press releases or public statements are not
currently available and may not be delivered on time or at all. Customers who purchase our services should
make the purchase decisions based upon features that are currently available. Salesforce.com, inc.
assumes no obligation and does not intend to update these forward-looking statements.
Safe Harbor
![Page 3: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/3.jpg)
Follow us @forcedotcom
@forcedotcom / #forcewebinar
Developer Force Group
facebook.com/forcedotcom
![Page 4: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/4.jpg)
Follow us @forcedotcom
Agenda
Why Social Enable Your App?
Use Cases
Eloqua: Demo and Sample Code
Tips
Summer ‘12 Preview
Q&A
![Page 5: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/5.jpg)
Follow us @forcedotcom
Make any app social with the Chatter API
REST API
![Page 6: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/6.jpg)
Follow us @forcedotcom
IT: Why Social Enable Your Custom Apps?
Collab between dept. &
teams
Make existing apps social
Partners, customers, suppliers
![Page 7: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/7.jpg)
Follow us @forcedotcom
IT: Why Social Enable Your Packaged Apps?
Connect to enterprise-
wide news feed (eg:
Chatter)
Distribute app virally via feed
Easily add social functionality
(feeds, likes, comments etc)
![Page 8: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/8.jpg)
Follow us @forcedotcom
![Page 9: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/9.jpg)
Follow us @forcedotcom
Chatter API Use Cases
![Page 10: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/10.jpg)
Follow us @forcedotcom
Next Generation Intranets for the Social Enterprise
Company-wide and team
based collaboration
Dynamic, real-time
information
Integration of multiple
data sources
Sharepoint webpart
reference implementation
Burberry World
![Page 11: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/11.jpg)
Follow us @forcedotcom
Use Case – Custom Mobile, Desktop, Tablet
Apps
Build custom mobile
applications, e.g.
– Product information apps
– Q&A
– Note taking and case
discussion for medical
providers
https://github.com/quintonwall/rhatter
https://github.com/cseymourSF/Chatter-API-iOS-Sample
![Page 12: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/12.jpg)
Follow us @forcedotcom
Use Case - Internet of Things • Share service data
from Cars, Generators,
Computers – using
custom object records /
feeds
• Foster conversation
centered on products
and services.
• Scenarios:
- Service
- Technical presales
- Technical support
- Project
Management
![Page 13: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/13.jpg)
Follow us @forcedotcom
Build Highly Branded Customer Communities
• Enable partners or
customers to
collaborate with your
employees or each
other
• Share business
process data
• Customize the UX to
meet your exact brand
requirements
• Extend to mobile and
tablet apps
![Page 14: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/14.jpg)
Follow us @forcedotcom
Drive Collaboration Around Business Process and Data
• Chatter feed inside
external
applications
• Supplement data,
process, and
analytics with rich
conversations
• Analytics, Finance,
Supply Chain
Management, HR
![Page 15: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/15.jpg)
Follow us @forcedotcom
Drive Collaboration Around Business Process and Data
![Page 16: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/16.jpg)
Follow us @forcedotcom
Eloqua Use Case
2.5 Billion
8.2 Billion
42 105,000
![Page 17: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/17.jpg)
Follow us @forcedotcom
Why Collaboration with Chatter?
Buyers need information
– Marketers create info assets
– Sales has relationships
Collaboration is key:
Sales intuition
+
Marketing resources
=
Buyer engagement
![Page 18: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/18.jpg)
Follow us @forcedotcom
What scenario are we solving
Marketer Sales
![Page 19: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/19.jpg)
Eloqua Demo
![Page 20: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/20.jpg)
Follow us @forcedotcom
REST API Resources
![Page 21: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/21.jpg)
Follow us @forcedotcom
Chatter API Resources
Latest version
– "/services/data/v24.0/chatter”
All requests to API made using OAuth2
Start here
http://developer.force.com/chatter-api
![Page 22: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/22.jpg)
Follow us @forcedotcom
How We’re Using the Chatter API
Feed
Users
Groups
Messages
Records
Topics
Recommendations
Files
Organization
Today Future
![Page 23: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/23.jpg)
Follow us @forcedotcom
/chatter/users/me
TBD – styling changes
![Page 24: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/24.jpg)
Feed Item Resources
![Page 25: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/25.jpg)
Comments Resources
![Page 26: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/26.jpg)
Users Resources
![Page 27: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/27.jpg)
Comments Resource ( POST )
![Page 28: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/28.jpg)
Follow us @forcedotcom
Chatter API Tips
![Page 29: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/29.jpg)
Follow us @forcedotcom
Chatter API or SObject REST API?
Chatter API:
– Semantically rich resources
– Localized presentation-ready data in JSON or XML form
– Comprehensive feed data in a single request
– Matches the web UI
SObject REST API:
– Data directly from the database
– Arbitrary SOQL queries
The same Oauth tokens can be used for both
![Page 30: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/30.jpg)
Follow us @forcedotcom
Tips - General
Group feeds are just record feeds
– /chatter/feeds/record/<group id>
Security model of UI is observed
– News feed can only be retrieved for the logged-in user
Following an object is described by a “subscription”.
DELETE the subscription to stop following
Use 'Accept-Encoding: gzip, deflate’ HTTP header
Always encrypt your Oauth access and refresh tokens
![Page 31: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/31.jpg)
Follow us @forcedotcom
Rate Limiting
Rate limiting:
– each user + remote access app combination gets 200 requests
per hour
Requests to endpoints outside /chatter and /connect are
not counted in this rate limit
– Image requests not rate limited
– Sobject API requests count against org-wide rate limit
Use separate remote access apps for production and
development to avoid being rate limited
– Also use different users if your automated tests run often
![Page 32: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/32.jpg)
Follow us @forcedotcom
Tips – Javascript served from non-salesforce domain
Use a controller pass-thru to work around Single Origin
Policy for ajax requests
Two approaches to rendering:
– pass JSON responses through server as-is and render using
client side template library such as Mustache, Handlebars, or
Eco
– Deserialize and render to HTML on the server and send to client
Requests from HTML (img tags, HTML forms) must also
use controller pass-thru to put Oauth token into HTTP
header
![Page 33: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/33.jpg)
Follow us @forcedotcom
Tips – Javascript served from salesforce domain
Can make ajax requests directly to Chatter API and
render to HTML on client.
– When Connect in Apex goes GA, you can also make requests to
a controller to get custom rendered HTML.
Use an ajax proxy if you’re on a custom domain. (see
the salesforce ajax toolkit) to work around SOP.
![Page 34: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/34.jpg)
Follow us @forcedotcom
Tips – Apex
Apex Now
– Call the Chatter API using Apex callouts
– Use session Id from UserInfo
Apex Future
– ConnectAPI class will provide Chatter API resources directly
![Page 35: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/35.jpg)
Follow us @forcedotcom
Connect in Apex (Pilot in Summer)
Exposing the same Chatter API resources and data in
Apex
Use cases include:
– Customized social experiences in Visualforce
– Custom Chatter feed rendering in Visualforce
– Posting feed items with @-mentions in Apex
– Modifying user and group photos in Apex
Taking pilot nominations over the next two weeks.
![Page 36: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/36.jpg)
Follow us @forcedotcom
How do I begin?
https://developer.force.com/chatter-api
![Page 37: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/37.jpg)
Follow us @forcedotcom
Take Aways
Chatter can drive better user engagement with external
applications
Easy to build integrations with existing applications
Wealth of interesting use cases emerge from news feed
integration.
![Page 38: Making Applications Social with the Chatter API](https://reader033.vdocuments.us/reader033/viewer/2022042813/54bf964c4a7959965a8b47ad/html5/thumbnails/38.jpg)
Follow us @forcedotcom
Q&A
http://bit.ly/chattersur
vey
@loganh @quintonwall