Facebook APIs

458 views

Published on

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
458
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Facebook APIs

  1. 1. Facebook Developer APIsAndrew SorensenUniversity of Washington | Tacoma
  2. 2. API TypesFacebook presents its APIs based on the typeof application you want to build:● For Websites● For Mobile● Apps on Facebook developers.facebook.com
  3. 3. Facebook for Websites1. Enables sharing & collaboration of rich media (use opengraph tags!)2. Social engagement (friends/community at large actions)3. Authentication - users dont want another login (SSO).4. Personalization (access user information)
  4. 4. Facebook for Mobile1. Login & Requests2. Sharing from other applications (From Facebook UI or via SDK)3. Bookmarks to user installed on-device applications within Facebook4. PaymentsThese can be developed via a nativeapplication (w/ OS specific SDK) or via a webapplication.
  5. 5. Apps on Facebook● Embedded on Facebook website: existing webpage displayed within facebook chrome (iframe).● Interaction with Facebook UI (like Notifications)● Facebook analytics
  6. 6. Using the APIs1. Use the provided widgets/dialogs (via javascript/iframe) with appropriate HTML markup (OpenGraph metadata properties).2. Use an [un]offical SDK to Facebooks webservices.3. Use the webservice (OpenGraph, REST) directly.
  7. 7. Offical SDKs1. JavaScript: (Rest, Graph API, Dialogs).2. PHP SDK3. iOS4. Android SDK
  8. 8. OAuth● Sharing passwords with a service is over● Request the permissions you need - users have to approve your application.● Avoid implementing your own OAuth library
  9. 9. Why use an SDK?1. Avoids dealing with webservice directly, decreasing tight technology coupling.2. Avoid writing unit tests for the webservice (tests are frequently provided with SDKs).3. API Updates are easier to deal with.
  10. 10. Writing your own SDK● If you want to write your own classes to interact with the webservice, youll need to support the Facebook Query Language (FQL).● Stay away from the REST api, as it is depreciated.● Both the REST and FQL APIs use the OAuth workflow.● Make sure you really have the need to create your own SDK before doing it!
  11. 11. My Advice1. Dont rely on facebook (or any 3rd party service) too heavily - they *will* have downtime.2. Facebook is the next "Myspace"3. Keep your secrets secret - dont share authentication tokens/secrets.4. Make sure your SDK is frequently updated & make sure you stay on the newest version.5. Handle all exceptions - they will be thrown.
  12. 12. Where to go from here● Read the api documentation (developers. facebook.com)● Check out existing SDKs for your language (like restfb for Java).● Look at how other websites/apps integrate with Facebook.
  13. 13. Questions?https://students.washington.edu/andrewx/

×