Extend - Develop social apps with Chatter and the Chatter API

1,798 views
1,621 views

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,798
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
25
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Extend - Develop social apps with Chatter and the Chatter API

  1. 1. Making Your Application Socialwith the Chatter API @quintonwall
  2. 2. Agenda§  Why Social Enable Your App?§  Use Cases§  REST API Resources§  Tips§  Summer ‘12 Preview§  Q&A
  3. 3. Make any app social with the Chatter API REST API
  4. 4. IT: Why Social Enable Your Custom Apps?Collab between Partners, customers, supp dept. & teams Make existing apps social
  5. 5. ISV: Why Social Enable Your Apps? Connect to Easily add socialenterprise-wide functionality (feeds,news feed (eg: likes, comments etc) Chatter) Distribute app virally via feed
  6. 6. Chatter API Use Cases
  7. 7. Next Generation Intranets for the Social EnterpriseBurberry World §  Company-wide and team based collaboration §  Dynamic, real-time information §  Integration of multiple data sources §  Sharepoint webpart reference implementation
  8. 8. Use Case – Custom Mobile, Desktop, TabletApps §  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
  9. 9. 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
  10. 10. 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
  11. 11. Drive Collaboration Around Business Process andData •  Chatter feed inside external applications •  Supplement data, process, and analytics with rich conversations •  Analytics, Finance, Supply Chain Management, HR
  12. 12. REST API Resources
  13. 13. Apigee is your friend.
  14. 14. Chatter API ResourcesSpecify version (v24 is the lasted) All requests require OAuth token
  15. 15. /chatter/users/me
  16. 16. Feed Item ResourcesChatter/feeds/news/{userId}/feed-items!
  17. 17. Comments ResourcesChatter/feed-items/{feedItemId}/comments!
  18. 18. Adding a feedItemChatter/feeds/user-profile/{userId}feed-items!
  19. 19. Working with Chatter Profile Photos
  20. 20. Chatter API Tips
  21. 21. 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
  22. 22. 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
  23. 23. 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
  24. 24. 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
  25. 25. 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.
  26. 26. 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
  27. 27. Connect in Apex
  28. 28. 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
  29. 29. Connect in Apex Demo
  30. 30. 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.
  31. 31. How do I begin? https://developer.force.com/chatter-api
  32. 32. Thank You.

×