Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Facebook appsincloud

1,239 views

Published on

Building facebook applications in the cloud, using Heroku and PHPFog.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Facebook appsincloud

  1. 1. Kirsten Jones, Technical Leader – Cisco Systemshttp://www.princesspolymath.com
  2. 2.  Cloud computing is the new black Getting started can be daunting Get a working stack in less than a half hour Cloud providers with Facebook quick start  Heroku  PHPFog
  3. 3.  “Polyglot” cloud provider supporting multiple languages https://devcenter.heroku.com/articles/facebo ok Tight integration with Facebook Additional PHP support is limited
  4. 4.  Visit https://developers.facebook.com/apps Prove you’re a human with the captcha…
  5. 5. Social integration is a little boring until you log in…
  6. 6. Log In with Facebook to make it fly
  7. 7. The default application hasexamples from the FacebookPHP SDK Profile Information Friends Photos and Likes
  8. 8. Check your email Pick a password
  9. 9.  https://toolbelt.herokuapp.com/
  10. 10.  Use ‘heroku’ or ‘cmd.exe’ on Windows On initial login, you may need to set up an SSH key
  11. 11.  http://developers.facebook.com/apps
  12. 12.  https://api.heroku.com/myapps
  13. 13.  https://api.heroku.com/myapps/floating-sunset-9217
  14. 14. % git clone git@heroku.com:<application_id>.git -o heroku% ls <application_id>
  15. 15.  Loads the Facebook PHP SDK and examples Index.php has the magic juice Grabs the current authenticated user Provides code examples for graph calls
  16. 16.  $likes = idx($facebook-> api(/me/likes?limit=4), data, array());
  17. 17.  You can use your local web server to serve the Facebook application You need to create a “development” version of the application on Facebook with your localhost URL Configure your key and secret in the .env file
  18. 18.  Free to get started Not strong PHP Cloud provider Facebook integration extremely easy Examples from Facebook SDK make it easy to get started
  19. 19.  PHP dedicated cloud service Supports PHP applications and frameworks such as WordPress, Drupal, Joomla, Zend, Cake and Kohana Tuned for PHP performance, scaling Facebook Jumpstart http://blog.phpfog.com/2012/03/19/a-closer- look-at-the-php-fog-facebook-jumpstart/
  20. 20.  ... or just sign in
  21. 21.  https://developers.facebook.com/apps
  22. 22. Application ID and Secret yourapplicationname.phpfogapp.com
  23. 23.  Hey, that looks familiar – let’s log in
  24. 24. Follow theinstructions for your O/S
  25. 25.  Git based Toolkit available ‘pf’ for macintosh Other O/Ss use git directly “Source Code” link on the dashboard to get started
  26. 26.  PHPFog also uses Facebook SDK example source code Apps are portable between systems – copy the code over to use a different system
  27. 27.  The Facebook SDK can be downloaded locally and deployed to any cloud provider – Engineyard, PHPCloud Creating the application and tying the URLs together needs to be done manually Engineyard has a webcast covering this process (creating the app locally then deploying)
  28. 28.  Free startup Try multiple providers to see what works best PHP-only developers may find PHPFog a better choice Polyglots can work on Heroku Other PHP cloud providers to check out: EngineYard (Orchestra) and PHPCloud (Zend)

×