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

beardouglas

May 29, 2013
Tweet

More Decks by beardouglas

Other Decks in Education

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 What can I find

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

    Contribute content Add friends Discover / Engage Wednesday, May 29, 13
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. Pro Tips ▪Personalize around friends and interests ▪Consider building up

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

    friends Discover / Engage Wednesday, May 29, 13
  12. 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
  13. Code: Creating the Story // Create a batch request RequestBatch

    requestBatch = new RequestBatch(); Wednesday, May 29, 13
  14. 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
  15. 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
  16. 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
  17. Creating a Custom Story ▪ Model your data ▪ Set

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

    up your custom story ▪ Create test objects create a collage Wednesday, May 29, 13
  19. 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
  20. Building Your App Database REST API REST Z Z Z

    Server + + + users + security Caching Networking + + The fun stuff! Wednesday, May 29, 13
  21. 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
  22. 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
  23. ParseUser user = new ParseUser(); user.setUsername("my name"); user.setPassword("my pass"); user.setEmail("[email protected]");

    user.signUpInBackground(new SignUpCallback() { }); Creating and Managing Users PFUser *user = [PFUser user]; user.username = @"my name"; user.password = @"my pass"; user.email = @"[email protected]"; [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 protected]"); user.signUp(null, { success: function(user) { }, error: function(user, error) {} }); Wednesday, May 29, 13
  24. 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
  25. Pro Tips ▪Track content performance through Insights ▪Generate image rich

    stories ▪Use proper Open Graph tags for great previews Wednesday, May 29, 13
  26. 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
  27. Add friends What can I find here? Contribute content Add

    friends Discover / Engage Wednesday, May 29, 13
  28. 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
  29. Discover / Engage What can I find here? Contribute content

    Add friends Discover / Engage Wednesday, May 29, 13
  30. Your Cross-Platform Checklist Use the same Facebook App ID everywhere

    Implement Facebook Login on every platform Wednesday, May 29, 13
  31. 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
  32. 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
  33. Promote What can I find here? Contribute content Add friends

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

    Discover / Engage But how do you even get someone here? Wednesday, May 29, 13
  35. Best Practices ▪ Real People. Real Things. ▪ Strong Call

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

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

    to Action ▪ Include Mobile Devices ▪ App Screenshots ▪ Test. Test. Test. Wednesday, May 29, 13
  38. Key Takeaways ▪Pay attention to your user’s lifecycle ▪Show engaging

    content first ▪Use Open Graph to tell rich stories Wednesday, May 29, 13
  39. 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
  40. 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