Using Facebook outside of Facebook


Published on

Talk given to the Difference Engine on Facebook Connect, Facebook for Websites and Open Graph Protocol

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Using Facebook outside of Facebook

  1. 1. HTTP://WWW.FLICKR.COM/PHOTOS/ E01/ Using Facebook, outside of Facebook Chris Thorpe Jaggeree Difference Engine /content/people/data/play
  2. 2. Jaggeree Difference Engine /content/people/data/play
  3. 3. HTTP://WWW.FLICKR.COM/PHOTOS/ JAGGEREE/ Before we dive into this... Jaggeree Difference Engine /content/people/data/play
  4. 4. History lesson Jaggeree Difference Engine /content/people/data/play Facebook Connect is 2 years old this year... although Connect is now Facebook for Websites
  5. 5. Jaggeree Difference Engine /content/people/data/play
  6. 6. What sort of things can you make? Jaggeree Difference Engine /content/people/data/play
  7. 7. Jaggeree Difference Engine /content/people/data/play
  8. 8. Jaggeree Difference Engine /content/people/data/play
  9. 9. Jaggeree Difference Engine /content/people/data/play
  10. 10. Jaggeree Difference Engine /content/people/data/play
  11. 11. Jaggeree Difference Engine /content/people/data/play
  12. 12. HTTP://WWW.FLICKR.COM/PHOTOS/ WISHYMOM/ Jaggeree Difference Engine /content/people/data/play Why are we doing stuff with Connect/Facebook for Websites... All about users, and lots of them. Not just users, but people who have curated “real” identities. Solves a major problem which is that the data you get in from registration forms is often useless. The most common ZIP codes in US data are 12345 and 90210 which means a larger than expected number of people from Schenectedy and Beverly Hills There’s also an over representation of Afghanistan.
  13. 13. HTTP://WWW.FLICKR.COM/PHOTOS/ SOVIETUK/ Jaggeree Difference Engine /content/people/data/play Second reason for using something like connect is social proof. It’s always more tempting to eat at a restaurant with a queue, rather than an empty one. Especially if that queue contains our friends or people we know of and trust Connect surfaces activity constantly in newsfeeds and activity streams, we can harness that for our apps
  14. 14. Jaggeree Difference Engine /content/people/data/play So, what is it? At it’s basis, it’s a method for logging into Facebook and sharing the success of the login with the site supporting Connect.
  15. 15. Jaggeree Difference Engine /content/people/data/play
  16. 16. Jaggeree Difference Engine /content/people/data/play It’s more than that though as it gives you an access token which allows you to do more such as post things to the newsfeed
  17. 17. Jaggeree Difference Engine /content/people/data/play like this...
  18. 18. Jaggeree Difference Engine /content/people/data/play One nice thing about Connect is that it can all be prototyped client side and if your page markup is clean and semantic, you can prototype or power live implementations just using the Connect libraries, your existing markup and something like JQuery
  19. 19. Jaggeree Difference Engine /content/people/data/play There also used to be things like fan boxes that you could embed into your pages.
  20. 20. HTTP://WWW.FLICKR.COM/PHOTOS/ JAGGEREE/ Jaggeree Difference Engine /content/people/data/play Then the world changed a bit last week in San Francisco at F8
  21. 21. HTTP://WWW.FLICKR.COM/PHOTOS/ FACTORYJOE/ Jaggeree Difference Engine /content/people/data/play Chris Messina of Google summed it up quite well with this bit of Photoshop trickery. Facebook made something which suggested that all roads on the web led to them.
  22. 22. HTTP://WWW.FLICKR.COM/PHOTOS/ JAGGEREE/ Jaggeree Difference Engine /content/people/data/play They launched something called Open Graph, where it was a mixture of the content graphs within websites which are often at best hidden and at worst absent and the social graph, creating an interest graph.
  23. 23. Jaggeree Difference Engine /content/people/data/play This new focus is clear on the developer homepage, with the focus being on Add Facebook to my site
  24. 24. Jaggeree Difference Engine /content/people/data/play And connect is now relaunched as Facebook for websites
  25. 25. Jaggeree Difference Engine /content/people/data/play So what is this Open Graph and where will we most likely see it... There are a collection of simple social plugins, the one you’re most like to see or implement is called Like which is a button which is accompanied by something
  26. 26. Jaggeree Difference Engine /content/people/data/play called the Open Graph Protocol, a standard being proposed by Facebook which for the first time brings a proposal for simple semantic metadata that describes pages in a standardised format
  27. 27. Jaggeree Difference Engine /content/people/data/play here’s a chunk of Open Graph metadata
  28. 28. Jaggeree Difference Engine /content/people/data/play The good news is that on the whole, it’s not just Facebook that can read the metadata. Here I’ve built a tiny app which essentially reads the meta tags and acts as a sort of generic metadata API
  29. 29. Jaggeree Difference Engine /content/people/data/play The good news is that on the whole, it’s not just Facebook that can read the metadata. Here I’ve built a tiny app which essentially reads the meta tags and acts as a sort of generic metadata API
  30. 30. Jaggeree Difference Engine /content/people/data/play The good news is that on the whole, it’s not just Facebook that can read the metadata. Here I’ve built a tiny app which essentially reads the meta tags and acts as a sort of generic metadata API
  31. 31. Jaggeree Difference Engine /content/people/data/play The good news is that on the whole, it’s not just Facebook that can read the metadata. Here I’ve built a tiny app which essentially reads the meta tags and acts as a sort of generic metadata API
  32. 32. Jaggeree Difference Engine /content/people/data/play The good news is that on the whole, it’s not just Facebook that can read the metadata. Here I’ve built a tiny app which essentially reads the meta tags and acts as a sort of generic metadata API
  33. 33. Jaggeree Difference Engine /content/people/data/play There’s also a social plugin called the like box which is the new replacement for the Fan box
  34. 34. Jaggeree Difference Engine /content/people/data/play And there’s a version of the Like control which allows you to add comments. This is useful for situations such as one where there is an article decrying the election of someone from the BNP being elected somewhere and allows you to provide your context around a headline such as “BNP wins seat in election” rather than just saying you like it. Not all publishers as we saw in the Huffington Post example provide a description text.
  35. 35. Jaggeree Difference Engine /content/people/data/play There are also activity and recommendation boxed which are powered from shares and likes. These are things you can place on your site
  36. 36. Jaggeree Difference Engine /content/people/data/play For instance you can show most recent activity. Since many of the new Facebook for Websites controls can display information about a user’s social and interest graph just from the presence of a Facebook cookie, rather than people declaratively logging in this gives instant personalisation
  37. 37. Jaggeree Difference Engine /content/people/data/play There’s also a recommendations box which is the longer term version of the activity box. This is about likes over all time.
  38. 38. Jaggeree Difference Engine /content/people/data/play So how would you get all those lovely users and their details to use. This is a lot of the old Facebook Connect type stuff in here, it’s pretty much a drop in replacement apart from a slightly different structure to the Javascript.
  39. 39. Jaggeree Difference Engine /content/people/data/play Here’s a chunk of PHP showing how you can hook the Facebook cookie for your site out and use the IDs and access tokens contained within them to get more information about the logged in user.
  40. 40. Jaggeree Difference Engine /content/people/data/play One useful social proof style mechanism is to use the Login with Faces control. This takes the login button and shows you pictures of friends who already use the service.
  41. 41. Jaggeree Difference Engine /content/people/data/play Or you can use a facepile which does a similar thing without the login button.
  42. 42. Jaggeree Difference Engine /content/people/data/play When you perform the login, instead of the complicated assent form with a mix of permissions you now have a simple one size fits all request for permission box. This makes it far easier for the developer who now doesn’t have to have all sorts of fallback methods for people who don’t want to share specific permissions. The downside is people who don’t want to give those permissions will just not hit Allow.
  43. 43. Jaggeree Difference Engine /content/people/data/play One things that has been talked about a lot is using the users existing social graph to personalise the site, pulling together lists of content such as music tracks your friends like within the core of your site. You’ve been able to do this for a while now, so this isn’t really anything new.
  44. 44. Jaggeree Difference Engine /content/people/data/play one other control which may be of some use to those of you working with live events and media is the live stream. this is being heavily used in the run up to the General Election.
  45. 45. Jaggeree Difference Engine /content/people/data/play Measurement and analytics of all of this is very possible, here’s some sample graphs from Insight. The lower one shows activity from Connect methods (feed story publication and interaction with it after being published)
  46. 46. Jaggeree Difference Engine /content/people/data/play Here’s an example of a Graph API call for the likes of a page from the Washington Post, showing the Open Graph information about the story and the information about the likes (still logged as fan count).
  47. 47. Jaggeree Difference Engine /content/people/data/play Here’s a similar Graph API query for a page in The Guardian which shows the likes/shares... These sorts of queries can be very useful for building counters of popularity for your content. Some publishers block this information though unless you are authenticated.
  48. 48. Jaggeree Difference Engine /content/people/data/play So what have people done with these news APIs so far
  49. 49. Jaggeree Difference Engine /content/people/data/play This is an example from Time magazine with the recommendations box
  50. 50. Jaggeree Difference Engine /content/people/data/play and a like button integrated within a social distribution panel
  51. 51. Jaggeree Difference Engine /content/people/data/play this was a lovely thing I found
  52. 52. Jaggeree Difference Engine /content/people/data/play One big change to the Connect and the generic APIs is that you can now cache data fro greater than 24 hours. This is a major bonus to publishers. This information can be kept up to date by subscribing for specific updates which are then posted to you using a webhooks compliant mechanism
  53. 53. Jaggeree Difference Engine /content/people/data/play So, what about things other than websites. Well you can do connect on Desktop clients and Adobe Air and Flash/Flex apps Let’s talk for a little while about one really important aspect which is Connect for phones, or what is now Facebook for Mobiles. This is an example of a Playfish game as an iPhone app with Facebook Connect to allow you to compete against your friends and reconcile your mobile scores in online score tables.
  54. 54. Jaggeree Difference Engine /content/people/data/play There’s a client library for Facebook for the iPhone which you can use from Objective C in XCode
  55. 55. Jaggeree Difference Engine /content/people/data/play There’s also a development environment for the iPhone called PhoneGap which allows you to make iPhone apps, either as prototypes or the real things using HTML, Javascript and CSS, compiling them in to a native app and giving you access to the underlying APIs of the phone.
  56. 56. Jaggeree Difference Engine /content/people/data/play People have now built ways that you can use the Facebook library for the iPhone from within PhoneGap.
  57. 57. Jaggeree Difference Engine /content/people/data/play Another lightweight app development environment that can build cross platform apps is Titanium Developer which uses native Javascript APIs as a domain specific language which is cross compiled to a Native App. It’s currently slightly unclear whether this breaks terms of service for iPhone OS4. However it’s a very impressive way of making apps quickly.
  58. 58. Jaggeree Difference Engine /content/people/data/play And it has a set of libraries specifically for Facebook
  59. 59. Jaggeree Difference Engine /content/people/data/play Finally there is a community contributed port of the Connect for iPhone to the Android platform. In addition there are native web clients which use the conventional Facebook for Websites controls.
  60. 60. HTTP://WWW.FLICKR.COM/PHOTOS/ JAGGEREE/ Jaggeree Difference Engine /content/people/data/play One more thing. We’ve talked about Facebook extending into the wider web. It’s clear they’re also interested in the physical world. There is talk of them buying Foursquare and also of having their own geoplatform. One interesting thing at F8 was the small RFID chips they gave every attendee to checkin at sessions...
  61. 61. HTTP://WWW.FLICKR.COM/PHOTOS/ JAGGEREE/ Jaggeree Difference Engine /content/people/data/play Which would allow status updates and an automated Like of a session. Imagine if they could bring this into the real world...
  62. 62. @anywhere from Twitter Jaggeree Difference Engine /content/people/data/play What else is there out there, well there are distributed identity plays such as JanRain’s RPX and Google Friend Connect which allow you to use different forms of identity such as MySpaceID, Yahoo logins, OpenID and Gmail accounts to name a few to login. There’s also the recently released (week before F8) @anywhere from Twitter
  63. 63. Jaggeree Difference Engine /content/people/data/play Which allows you to login to apps using your Twitter credentials
  64. 64. Jaggeree Difference Engine /content/people/data/play and those applications can do Graph API like queries to find out more about users using simple JavaScript controls like hover cards, follow and retweet buttons
  65. 65. Jaggeree Difference Engine /content/people/data/play and allow you to post messages from deep within sites you’ve connected with
  66. 66. Jaggeree Difference Engine /content/people/data/play you can read a bit about some prototypes of this we made at The Guardian.
  67. 67. Get users quick Social proof of user actions Social sharing of content Social augmentation/personalisation of content Can now cache data for more than 24 hours Jaggeree Difference Engine /content/people/data/play So why do this...
  68. 68. Jaggeree Difference Engine /content/people/data/play Here are some URLs which you may find useful. I’ll share this document on Slideshare later today.
  69. 69. HTTP://WWW.FLICKR.COM/PHOTOS/ JAGGEREE/ Chris Thorpe @jaggeree Jaggeree Difference Engine /content/people/data/play