Hi5 Hackathon Presentation

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    4 Favorites

    Hi5 Hackathon Presentation - Presentation Transcript

    1. hi5 Platform Pre-Launch Developer Hackathon March 15, 2008
    2. hi5 Platform About hi5 Developer Console Integration Points Application Discovery hi5 OpenSocial Extensions Why Develop for hi5? Roadmap Demo
    3. hi5 The Truly Global Social Network
    4. The Developer Console Managing Your Applications
    5. Developer Console Add and manage applications Refresh metadata and i18n messages Manage other developers Manage API Keys Submit applications to the hi5 directory View analytics Simple in-line application editor Multi-language testing hi5 Developer blog feed
    6. Developer Console
    7. Application Editor
    8. Language Preview
    9. Analytics
    10. Anatomy of a hi5 Application A seamless user experience within hi5
    11. Integration Points Preview Homepage My Applications Profile Module Draggable, minimizable Skins feature allows seamless UI integration Canvas Page Dedicated page for applications Monetization opportunity, allows embedded ad tags
    12. Profile Module
    13. Profile Module Action Links
    14. Profile Navigation Tab
    15. Canvas Page
    16. Preview
    17. Homepage
    18. Application Discovery Achieving massive distribution across the globe
    19. Application Discovery Application Directory Categories, sorting and filtering Application Homepage My Friends' applications Other recommendations Manage your applications Viral Channels Friend Updates Notifications Invites Email (limited to 1 per user per app per day)
    20. Application Directory
    21. Applications Homepage
    22. Friend Updates On both homepage and profile page Created using the OpenSocial Activity API (requestCreateActivity) Publication not guaranteed but typically high (> 80%)
    23. Notifications Sent using the OpenSocial request* API. (requestSendMessage, type=NOTIFICATION) Limited to 5 per user per app per day
    24. Invites All apps have built-in invite flow from profile and canvas pages
    25. Invites
    26. Homepage Alerts
    27. Email Notifications Limited to 1 per user/app/day
    28. hi5 Features Extending OpenSocial to meet your needs
    29. OpenSocial Feature: hi5 An optional feature that provides access to additional hi5- specific functionality. New data requests (hi5 feature) Photos (hi5.fetchAlbumsDataRequest) Online Presence (hi5.fetchPresenceRequest) Status (hi5.fetchStatusRequest) New fields Link for friend update media (hi5.ActivityMediaItemField.LINK) Much more to come!
    30. OpenSocial Feature: hi5-template Templating support, tag library, and facility for parameterizing i18n messages <template xmlns:hi5=\"http://www.w3.org/1999/xhtml\"></template> <if test=\"expression\"></if> <else-if test=\"expression\"></if> <else></if> <for-each var=\"variable\" source=\"data-source\"></for-each> <apply-template name=\"template-name\"/> <hi5:name person=\"person-object\"/> <hi5:profile-pic [id=\"member-id\" | person=\"person-object\"] size=\"thumb | small\"/> <hi5:message key=\"property\" [param=\"value\"]*/>
    31. OpenSocial Feature: hi5-lifecycle Allows developers to declare callback URLs for app installation and removal Usage: <Optional feature=\"hi5-lifecycle\"> <Param name=\"installPingUrl\" value=\"http://yourserver/handleInstall\"/> <Param name=\"removePingUrl\" value=\"http://yourserver/handleRemove\"/> </Optional>
    32. Demo hi5 Gifts Tutorial
    33. Basic Gifts Tutorial http://lou.sandbox.hi5.com/friend/apps/entry/webvan.hi5.com/gadgets/gifts.xml Gifts with i18n http://lou.sandbox.hi5.com/friend/apps/entry/www.webvan.hi5.com/friend/apps/developer/app/get/xml/5197 Template Demo http://lou.sandbox.hi5.com/friend/apps/entry/www.sandbox.hi5.com/friend/apps/developer/app/get/xml/5206
    34. Develop With Us More reasons to develop for hi5
    35. More reasons to develop for hi5... A new audience via our unique footprint in Latin America, Europe and Asia Of the more than 80 million individuals registered with hi5, less than a third are also active on the other leading social networks, incl. FB, MySpace, Bebo, Friendster (comscore) OpenSocial! Apps can be deeply embedded within hi5, as well as easily translated beyond hi5 to other OpenSocial- enabled websites
    36. More reasons to develop for hi5... $$$ A dedicated canvas page that can be monetized Promotions on the hi5 blog (one developer post/mo – rotating among our registered developers with popular apps) Free Infrastructure from Joyent hi5 Developers could win one year of Joyent’s Free Accelerator™ scalable, on-demand infrastructure for their hi5 app! Limited number at launch, more to come
    37. More reasons to develop for hi5... Translation Services We plan on offering translation support into Spanish to the first 100 high-quality applications approved for production We look forward to offering built-in translation support for all hi5 applications in multiple languages in future versions of the platform
    38. hi5 Platform Launch Several hundred apps in our sandbox that we are reviewing and working with developers to finalize. White-list style approach to ensure app quality and user- centric relevancy (guidelines to be published this week) March 31st Public Launch Public rollout begins! We'll launch with as many applications that have met our guidelines and are ready to go live.
    39. Important Links Developer site http://developer.hi5.com - All below links are accessible from here. Developer Registration http://sandbox.hi5.com/friend/apps/developer.do API Documentation http://api.hi5.com Application Guidelines http://www.hi5networks.com/platform/wiki/AppGuidelines Bug Tracker http://www.hi5networks.com/platform/report Discussion Forums http://www.hi5networks.com/platform/discussion
    40. Questions
    41. The Gifts Tutorial Step-by-step guide to building an OpenSocial app on hi5
    42. Basic OpenSocial XML <?xml version=\"1.0\" encoding=\"UTF-8\" ?> <Module> <ModulePrefs title=\"Gifts Tutorial” author_email=” lrm718@yahoo.com”> <Require feature=\"opensocial-0.7\" /> </ModulePrefs> <Content type=\"html\"> <![CDATA[ Hello, world! ]]> </Content> </Module>
    43. Important Meta-data <ModulePrefs title=\"Gifts Tutorial” author_email=”lrm718@yahoo.com” summary=\"short description for list views\" description=\"long description for preview\" thumbnail=\"http://yourhost/path_to_120x60_img\" icon=\"http://yourhost/path_to_15x15_favicon\" >
    44. Initialization gadgets.util.registerOnLoadHandler(init); function init() { loadFriends(); }
    45. Fetching Friends function loadFriends() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest('VIEWER'), 'viewer'); req.add(req.newFetchPeopleRequest('VIEWER_FRIENDS'), 'viewerFriends'); req.send(onLoadFriends); }
    46. Handle the Response
    47. Handle the Response function onLoadFriends(data) { var viewer = data.get('viewer').getData(); var viewerFriends = data.get('viewerFriends').getData(); html = new Array(); html.push('<ul>'); viewerFriends.each(function(person) { html.push('<li>' + person.getDisplayName() + \"</li>\"); }); html.push('</ul>'); document.getElementById('friends').innerHTML = html.join(''); }
    48. Adding App Data
    49. Adding App Data
    50. Adding App Data
    51. Adding App Data var givenGifts = {}; function giveGift() { var nut = document.getElementById('nut').value; var friend = document.getElementById('person').value; givenGifts[friend] = nut; var json = gadgets.json.stringify(givenGifts); var req = opensocial.newDataRequest(); req.add(req.newUpdatePersonAppDataRequest(opensocial.DataRequest.PersonId.VIEWER, 'gifts', json)); req.send(); }
    52. Displaying App Data
    53. Displaying App Data
    54. Displaying App Data
    55. Displaying App Data function updateGiftList(viewer, data, friends) { var json = data[viewer.getId()]['gifts']; if (!json) { givenGifts = {}; } try { givenGifts = gadgets.json.parse(json); } catch (e) { givenGifts = {}; } var options = ['a cashew nut', 'a peanut', 'a hazelnut', 'a red pistachio nut']; var html = new Array(); html.push('You have given:'); html.push('<ul>'); for (i in givenGifts) { if (+(i) > 0) { html.push('<li>' + friends[i] + ' received ' + options[givenGifts[i]] + '</li>'); } } html.push('</ul>'); document.getElementById('given').innerHTML = html.join(''); }
    56. Displaying App Data
    57. Displaying App Data
    58. Resizing the Window In Module element: <Require feature=\"dynamic-height\"/> After rendering content: gadgets.window.adjustHeight()
    59. Creating Activity function createActivity(title) { var opts = new Array(); opts[opensocial.Activity.Field.TITLE] = title; var mediaItems = new Array(); var mediaItem = opensocial.newActivityMediaItem(opensocial.Activity.MediaItem.Type.IMAGE, viewer. getField(opensocial.Person.Field.THUMBNAIL_URL)); // Add a media item link if supported if(gadgets.util.hasFeature('hi5') && opensocial.getEnvironment().supportsField(opensocial.Environment. ObjectType.ACTIVITY_MEDIA_ITEM, hi5.ActivityMediaItemField.LINK)) { mediaItem.setField(hi5.ActivityMediaItemField.LINK, viewer.getField(opensocial.Person.Field. PROFILE_URL)); } var activity = opensocial.newActivity(opts);
    60. Sending Notifications function sendNotifications(notification, toIds) { var params = new Object(); params[opensocial.Message.Field.TYPE] = opensocial. Message.Type.NOTIFICATION; var message = opensocial.newMessage(notification, params); opensocial.requestSendMessage(toIds, message); }
    61. Sending Notifications var viewerLink = viewer.getField(opensocial.Person.Field.PROFILE_URL); var notification = '<a href=\"' + viewerLink + '\">' + viewer.getDisplayName() + '</a> gave you a ' + options[nut]; var toIds = {}; toIds.push(friend); sendNotifications(notification, toIds);
    62. Making Content Requests function getJournal() { gadgets.io.makeRequest('http://api.hi5.com/rest/feed/journal/userId', function(response) { var data = response.data; // do something with data }, {'METHOD' : 'GET', 'CONTENT_TYPE' : 'DOM'} ); }
    63. Working With Views
    64. Working With Views <Content type=“html” view=“profile”> <![CDATA[ <script src=\"http://images.hi5.com/images/opensocial/gifts.js\" ></script> <script> gadgets.util.registerOnLoadHandler(initProfile); </script> <div id='main'> <div id='received’></div> </div> ]]> </Content>
    65. Navigating to a View
    66. Navigating to a View function navToCanvas() { var views = gadgets.views.getSupportedViews(); gadgets.views.requestNavigateTo(views['canvas']); }
    67. Using Skins In ModulePrefs: <Require feature=\"skins\"/> In Your Application: function setSkin() { document.write('<style type=\"text/css\">'); document.write('.main {'); bgColor = gadgets.skins.getProperty(gadgets.skins.Property.BG_COLOR); if(bgColor) { document.write('background-color:' + bgColor + ';'); } document.write('}'); document.wrtie('</style>'); }
    68. Adding the hi5 OpenSocial API In ModulePrefs: <Optional feature='hi5'/>
    69. Adding hi5 data requests var req = opensocial.newDataRequest(); req.add(req.newUpdatePersonAppDataRequest(opensocial.DataRequest.PersonId.VIEWER,'gifts', json)); req.add(req.newFetchPersonRequest('VIEWER'), 'viewer'); req.add(req.newFetchPersonRequest('OWNER'), 'owner'); req.add(req.newFetchPeopleRequest('VIEWER_FRIENDS'), 'viewerFriends'); req.add(req.newFetchPersonAppDataRequest('VIEWER', 'gifts'), 'data'); if(gadgets.util.hasFeature('hi5')) { req.add(hi5.newFetchStatusRequest('OWNER'),'ownerStatus'); req.add(hi5.newFetchPresenceRequest('VIEWER_FRIENDS'),'viewerFriendsPresence'); } req.send(onLoadFriends); Documentation on hi5 js objects: http://www.hi5networks.com/platform/wiki/JsAPI (Work in progress)
    70. hi5 REST API api.hi5.com Roadmap We will add support to access more of our REST API via OpenSocial calls We will move towards compliance with a standard OpenSocial REST API implementation
    71. Sample App Code http://webvan.hi5.com/gadgets/gifts.js http://webvan.hi5.com/gadgets/gifts.xml

    + lrm718lrm718, 2 years ago

    custom

    3243 views, 4 favs, 3 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 3243
      • 3233 on SlideShare
      • 10 from embeds
    • Comments 0
    • Favorites 4
    • Downloads 63
    Most viewed embeds
    • 8 views on http://202.151.178.232
    • 1 views on http://202.170.127.139
    • 1 views on http://localhost

    more

    All embeds
    • 8 views on http://202.151.178.232
    • 1 views on http://202.170.127.139
    • 1 views on http://localhost

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories