Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Sticky Social Apps

Sticky Social Apps

Best practices and strategies for keeping people engaged in your application

B3f1258707f5a504890fbdd0255de4a5?s=128

beardouglas

May 29, 2013
Tweet

Transcript

  1. developers Making Sticky Social Apps Bear Douglas and Christine Abernathy

    github: beardouglas, caabernathy @beardigsit @caabernathy Wednesday, May 29, 13
  2. The Lifecycle of a Sticky App Wednesday, May 29, 13

  3. The Lifecycle of a Sticky App What can I find

    here? Contribute content Add friends Discover / Engage Wednesday, May 29, 13
  4. Solving the empty room problem What can I find here?

    Contribute content Add friends Discover / Engage Wednesday, May 29, 13
  5. Wednesday, May 29, 13

  6. Wednesday, May 29, 13

  7. Code: Fetching a person’s list of friends using app Wednesday,

    May 29, 13
  8. Code: Fetching a person’s list of friends using app String

    fqlQuery = "SELECT uid, name FROM user WHERE uid IN " + "(SELECT uid2 FROM friend WHERE uid1 = me() LIMIT 25) AND is_app_user = 1"; Bundle params = new Bundle(); params.putString("q", fqlQuery); Request request = new Request(Session.getActiveSession(), "/fql", params, HttpMethod.GET, new Request.Callback() { Wednesday, May 29, 13
  9. Code: Fetching a person’s list of friends using app String

    fqlQuery = "SELECT uid, name FROM user WHERE uid IN " + "(SELECT uid2 FROM friend WHERE uid1 = me() LIMIT 25) AND is_app_user = 1"; Bundle params = new Bundle(); params.putString("q", fqlQuery); Request request = new Request(Session.getActiveSession(), "/fql", params, HttpMethod.GET, new Request.Callback() { @Override public void onCompleted(Response response) { // Get the array of data returned JSONArray dataArray = (JSONArray) response.getGraphObject().getProperty("data"); if (dataArray.length() > 0) { // Cast this into a defined interface representing the response GraphObjectList<MyResult> result = GraphObject.Factory.createList(dataArray, MyResult.class); requestOpenGraphData(result); } } }); Wednesday, May 29, 13
  10. Code: Fetching a person’s list of friends using app request.executeAsync();

    String fqlQuery = "SELECT uid, name FROM user WHERE uid IN " + "(SELECT uid2 FROM friend WHERE uid1 = me() LIMIT 25) AND is_app_user = 1"; Bundle params = new Bundle(); params.putString("q", fqlQuery); Request request = new Request(Session.getActiveSession(), "/fql", params, HttpMethod.GET, new Request.Callback() { @Override public void onCompleted(Response response) { // Get the array of data returned JSONArray dataArray = (JSONArray) response.getGraphObject().getProperty("data"); if (dataArray.length() > 0) { // Cast this into a defined interface representing the response GraphObjectList<MyResult> result = GraphObject.Factory.createList(dataArray, MyResult.class); requestOpenGraphData(result); } } }); Wednesday, May 29, 13
  11. Code: Reading Open Graph Data from a list of friends

    Wednesday, May 29, 13
  12. Code: Reading Open Graph Data from a list of friends

    private void requestOpenGraphData(GraphObjectList<MyResult> friends) { RequestBatch requestBatch = new RequestBatch(); for (MyResult friend : friends) { Wednesday, May 29, 13
  13. Code: Reading Open Graph Data from a list of friends

    private void requestOpenGraphData(GraphObjectList<MyResult> friends) { RequestBatch requestBatch = new RequestBatch(); for (MyResult friend : friends) { Request ogDataRequest = Request.newGraphPathRequest( Session.getActiveSession(), friend.getUid()+"/resourcebrowser:browse", new Request.Callback() { public void onCompleted(Response response) { FacebookRequestError error = response.getError(); if (error == null) { // Process the data for display } } }); requestBatch.add(ogDataRequest); Wednesday, May 29, 13
  14. Code: Reading Open Graph Data from a list of friends

    } requestBatch.executeAsync(); } private void requestOpenGraphData(GraphObjectList<MyResult> friends) { RequestBatch requestBatch = new RequestBatch(); for (MyResult friend : friends) { Request ogDataRequest = Request.newGraphPathRequest( Session.getActiveSession(), friend.getUid()+"/resourcebrowser:browse", new Request.Callback() { public void onCompleted(Response response) { FacebookRequestError error = response.getError(); if (error == null) { // Process the data for display } } }); requestBatch.add(ogDataRequest); Wednesday, May 29, 13
  15. Demo: Reading Open Graph Data https://github.com/beardouglas/andevcon/ Wednesday, May 29, 13

  16. Pro Tips Wednesday, May 29, 13

  17. Pro Tips ▪Personalize around friends and interests Wednesday, May 29,

    13
  18. Pro Tips ▪Personalize around friends and interests ▪Consider building up

    your own graph Wednesday, May 29, 13
  19. Pro Tips ▪Personalize around friends and interests ▪Consider building up

    your own graph ▪Put aggregation data logic on a server Wednesday, May 29, 13
  20. Contributing content What can I find here? Contribute content Add

    friends Discover / Engage Wednesday, May 29, 13
  21. Case study: TripAdvisor Average user engagement increased Users who connect

    through Facebook are x as likely to contribute content “Cities I’ve Visited” app saw x increase in monthly active users after adding Open Graph Wednesday, May 29, 13
  22. What is Open Graph? Wednesday, May 29, 13

  23. Wednesday, May 29, 13

  24. User + Action + Object = Story Wednesday, May 29,

    13
  25. ________ + ________ + ________ = Story Wednesday, May 29,

    13
  26. ________ + ________ + ________ Christine ate a meal =

    Story Wednesday, May 29, 13
  27. Telling Stories: Using Open Graph Wednesday, May 29, 13

  28. Telling Stories: Using Open Graph Common Wednesday, May 29, 13

  29. Telling Stories: Using Open Graph Common Custom Wednesday, May 29,

    13
  30. Open Graph and Sharing Wednesday, May 29, 13

  31. Open Graph and Sharing Object API Wednesday, May 29, 13

  32. Open Graph and Sharing User Owned Objects Object API Wednesday,

    May 29, 13
  33. Open Graph and Sharing Share Dialog User Owned Objects Object

    API Wednesday, May 29, 13
  34. Example: Common Story Wednesday, May 29, 13

  35. Example: Common Story Wednesday, May 29, 13

  36. Example: Common Story Wednesday, May 29, 13

  37. Code: Creating the Story Wednesday, May 29, 13

  38. Code: Creating the Story // Create a batch request RequestBatch

    requestBatch = new RequestBatch(); Wednesday, May 29, 13
  39. Code: Creating the Story // Create a batch request RequestBatch

    requestBatch = new RequestBatch(); // Create object creation request Bundle objectParams = new Bundle(); JSONObject book = new JSONObject(); book.put("title", "A Game of Thrones"); // ... objectParams.putString("object", book.toString()); Request objectRequest = new Request(session,"me/objects/books.book", objectParams, HttpMethod.POST, null); objectRequest.setBatchEntryName("objectCreate"); requestBatch.add(objectRequest); Wednesday, May 29, 13
  40. Code: Creating the Story // Create a batch request RequestBatch

    requestBatch = new RequestBatch(); // Create the publish action request Bundle actionParams = new Bundle(); actionParams.putString("book", "{result=objectCreate:$.id}"); Request actionRequest = new Request(session,"me/books.reads", actionParams, HttpMethod.POST, null); requestBatch.add(actionRequest); // Create object creation request Bundle objectParams = new Bundle(); JSONObject book = new JSONObject(); book.put("title", "A Game of Thrones"); // ... objectParams.putString("object", book.toString()); Request objectRequest = new Request(session,"me/objects/books.book", objectParams, HttpMethod.POST, null); objectRequest.setBatchEntryName("objectCreate"); requestBatch.add(objectRequest); Wednesday, May 29, 13
  41. Code: Creating the Story // Execute the batch request requestBatch.executeAsync();

    // Create a batch request RequestBatch requestBatch = new RequestBatch(); // Create the publish action request Bundle actionParams = new Bundle(); actionParams.putString("book", "{result=objectCreate:$.id}"); Request actionRequest = new Request(session,"me/books.reads", actionParams, HttpMethod.POST, null); requestBatch.add(actionRequest); // Create object creation request Bundle objectParams = new Bundle(); JSONObject book = new JSONObject(); book.put("title", "A Game of Thrones"); // ... objectParams.putString("object", book.toString()); Request objectRequest = new Request(session,"me/objects/books.book", objectParams, HttpMethod.POST, null); objectRequest.setBatchEntryName("objectCreate"); requestBatch.add(objectRequest); Wednesday, May 29, 13
  42. Creating a Custom Story Wednesday, May 29, 13

  43. Creating a Custom Story ▪ Model your data create a

    collage Wednesday, May 29, 13
  44. Creating a Custom Story ▪ Model your data ▪ Set

    up your custom story create a collage Wednesday, May 29, 13
  45. Creating a Custom Story ▪ Model your data ▪ Set

    up your custom story ▪ Create test objects create a collage Wednesday, May 29, 13
  46. Creating a Custom Story ▪ Model your data ▪ Set

    up your custom story ▪ Create test objects ▪ Publish test actions create a collage Wednesday, May 29, 13
  47. Demo: Creating a Story https://github.com/beardouglas/andevcon/ Wednesday, May 29, 13

  48. Pro Tip: User control and Explicit Sharing Wednesday, May 29,

    13
  49. Pro Tip: User control and Explicit Sharing Wednesday, May 29,

    13
  50. Pro Tip: User control and Explicit Sharing Wednesday, May 29,

    13
  51. Pro Tip: User control and Implicit Sharing Wednesday, May 29,

    13
  52. Pro Tip: User control and Implicit Sharing Wednesday, May 29,

    13
  53. Pro Tip: User control and Implicit Sharing Wednesday, May 29,

    13
  54. Pro Tip: User control and Implicit Sharing Wednesday, May 29,

    13
  55. Pro Tip: User control and Implicit Sharing Wednesday, May 29,

    13
  56. http://www.parse.com/ Introducing Parse Wednesday, May 29, 13

  57. Building Your App Database Wednesday, May 29, 13

  58. Building Your App Database REST API REST Z Z Z

    Server + + + users + security Caching Networking + + The fun stuff! Wednesday, May 29, 13
  59. Parse Lets You Focus on the Fun Stuff Database REST

    API REST Z Z Server + + + users + security Caching Networking + + The fun stuff! Wednesday, May 29, 13
  60. Parse Lets You Focus on the Fun Stuff no no

    no no no yes! Database REST API REST Z Z Server + + + users + security Caching Networking + + The fun stuff! Z Wednesday, May 29, 13
  61. Creating and Managing Users Wednesday, May 29, 13

  62. ParseUser user = new ParseUser(); user.setUsername("my name"); user.setPassword("my pass"); user.setEmail("email@example.com");

    user.signUpInBackground(new SignUpCallback() { }); Creating and Managing Users PFUser *user = [PFUser user]; user.username = @"my name"; user.password = @"my pass"; user.email = @"email@example.com"; [user signUpInBackgroundWithBlock:^(BOOL succeeded, NSError *error) { }]; var user = new Parse.User(); user.set("username", "my name"); user.set("password", "my pass"); user.set("email", "email@example.com"); user.signUp(null, { success: function(user) { }, error: function(user, error) {} }); Wednesday, May 29, 13
  63. Saving Data ParseObject gameScore = new ParseObject("Score"); gameScore.put("points", 1337); gameScore.put("playerName",

    "Christine Abernathy"); gameScore.saveInBackground(); Wednesday, May 29, 13
  64. Querying Data ParseQuery query = new ParseQuery("Score");; query.whereEqualTo("playerName", "Christine Abernathy"];

    query.whereGreaterThan("points", 10000]; query.findInBackground(new FindCallback() { public void done(List<ParseObject> pointList, ParseException e) { // Process the result } }); Wednesday, May 29, 13
  65. Other Parse Features for Cross-Platform Mobile Apps Wednesday, May 29,

    13
  66. Demo: Adding Parse https://github.com/beardouglas/andevcon/ Wednesday, May 29, 13

  67. Pro Tips Wednesday, May 29, 13

  68. Pro Tips ▪Track content performance through Insights Wednesday, May 29,

    13
  69. Pro Tips ▪Track content performance through Insights ▪Generate image rich

    stories Wednesday, May 29, 13
  70. Pro Tips ▪Track content performance through Insights ▪Generate image rich

    stories ▪Use proper Open Graph tags for great previews Wednesday, May 29, 13
  71. Pro Tips ▪Track content performance through Insights ▪Generate image rich

    stories ▪Use proper Open Graph tags for great previews ▪Consider adding Internationalization support Wednesday, May 29, 13
  72. Add friends What can I find here? Contribute content Add

    friends Discover / Engage Wednesday, May 29, 13
  73. Case study: Waze Wazers who use Facebook drive more miles

    Users who connect through Facebook use Waze . x as often as other users User growth doubled after adding Facebook Login How can a mapping app be social? Enable friends to carpool and share directions to events Wednesday, May 29, 13
  74. Discover / Engage What can I find here? Contribute content

    Add friends Discover / Engage Wednesday, May 29, 13
  75. Re-engagement: Quora email Wednesday, May 29, 13

  76. Re-engagement: Upworthy Wednesday, May 29, 13

  77. Re-engagement: Instagram Wednesday, May 29, 13

  78. Wednesday, May 29, 13

  79. Wednesday, May 29, 13

  80. Your Cross-Platform Checklist Wednesday, May 29, 13

  81. Your Cross-Platform Checklist Use the same Facebook App ID everywhere

    Wednesday, May 29, 13
  82. Your Cross-Platform Checklist Use the same Facebook App ID everywhere

    Implement Facebook Login on every platform Wednesday, May 29, 13
  83. Your Cross-Platform Checklist Use the same Facebook App ID everywhere

    Enable Deep Linking for Android and iOS Implement Facebook Login on every platform Wednesday, May 29, 13
  84. Your Cross-Platform Checklist Use the same Facebook App ID everywhere

    Enable Deep Linking for Android and iOS Make it easy to share from every platform Implement Facebook Login on every platform Wednesday, May 29, 13
  85. Promote What can I find here? Contribute content Add friends

    Discover / Engage Wednesday, May 29, 13
  86. Promote What can I find here? Contribute content Add friends

    Discover / Engage But how do you even get someone here? Wednesday, May 29, 13
  87. Get installs directly from News Feed Wednesday, May 29, 13

  88. Best Practices Wednesday, May 29, 13

  89. Best Practices ▪ Real People. Real Things. Wednesday, May 29,

    13
  90. Best Practices ▪ Real People. Real Things. ▪ Strong Call

    to Action Wednesday, May 29, 13
  91. Best Practices ▪ Real People. Real Things. ▪ Strong Call

    to Action ▪ Include Mobile Devices Wednesday, May 29, 13
  92. Best Practices ▪ Real People. Real Things. ▪ Strong Call

    to Action ▪ Include Mobile Devices ▪ App Screenshots Wednesday, May 29, 13
  93. Best Practices ▪ Real People. Real Things. ▪ Strong Call

    to Action ▪ Include Mobile Devices ▪ App Screenshots ▪ Test. Test. Test. Wednesday, May 29, 13
  94. Sponsored Stories Wednesday, May 29, 13

  95. Sponsoring Open Graph Stories Friend’s action generates a story Wednesday,

    May 29, 13
  96. Sponsoring Open Graph Stories Friends engage with story Sponsor story

    Wednesday, May 29, 13
  97. Sponsoring Open Graph Stories Friends engage with story Wednesday, May

    29, 13
  98. Open Graph Insights Wednesday, May 29, 13

  99. Key Takeaways Wednesday, May 29, 13

  100. Key Takeaways ▪Pay attention to your user’s lifecycle Wednesday, May

    29, 13
  101. Key Takeaways ▪Pay attention to your user’s lifecycle ▪Show engaging

    content first Wednesday, May 29, 13
  102. Key Takeaways ▪Pay attention to your user’s lifecycle ▪Show engaging

    content first ▪Use Open Graph to tell rich stories Wednesday, May 29, 13
  103. Key Takeaways ▪Pay attention to your user’s lifecycle ▪Show engaging

    content first ▪Use Open Graph to tell rich stories ▪Add cross-platform support Wednesday, May 29, 13
  104. Key Takeaways ▪Pay attention to your user’s lifecycle ▪Show engaging

    content first ▪Use Open Graph to tell rich stories ▪Add cross-platform support ▪A/B test content and ads to find the most effective ways to get users Wednesday, May 29, 13
  105. developers.facebook.com/android Facebook SDK . for Android github.com/fbsamples/android-3.0-howtos Wednesday, May 29,

    13