Activities in OpenSocial CS 195.35: Survey of Contemporary Technologies.

Slides:



Advertisements
Similar presentations
MySpace Developer Platform Dive Into OpenSocial Maxwell Newbould Development Manager OpenSocial Container Team, MySpace Seattle.
Advertisements

OpenSocial CS : Survey of Contemporary Technologies.
Library Online Catalog Tutorial Pentagon Library Last Updated March 2008.
Overseas Library Catalog – Request Item Overseas Library Catalog Request loaned item.
Tutorial 6 Working with Web Forms
Open Social A Quick Introduction and Tutorial. What is Open-Social in a Nutshell? Open-Social provides a API specification for social networking sites.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial Holdings Management Adding, Editing, and Assigning Notes support.ebsco.com.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2006 Microsoft Corporation.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
NextGen Technology upgrade – Synerizip - Sandeep Kamble.
PHP Tutorials 02 Olarik Surinta Management Information System Faculty of Informatics.
PHP Forms and User Input The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input.
OpenSocial ANATOMY AND LIFE CYCLE Paul Lindner, Architect, Hi5 Networks November 27th, 2007.
Server-side Scripting Powering the webs favourite services.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Web application architecture
OneDrive mailbox.makeEwsRequest( ); Message forwarded by ExchangeEndpoint retrieves attachments App in Outlook.
OneDrive mailbox.makeEwsRequest( ); Message forwarded by ExchangeEndpoint retrieves attachments App in Outlook.
OpenSocial Kevin Marks Chris Chabot Agenda Introduction - What is OpenSocial Building an OpenSocial Application Best Practices Kinds of container Becoming.
CSC 2720 Building Web Applications Server-side Scripting with PHP.
Trinity Logistics A Transportation Management Company.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
My Workspace ELearning in Sakai Randy Graff, PhD HSC Training.
MyPO and MyCLM SanDisk iPhone App UI Samples. MyPO SanDisk iPhone App UI Samples.
The OpenSocial API CS : Survey of Contemporary Technologies.
NOAA Weather Patrick Wolfram. What it does Allows user to specify a zip code Performs HTTP GET requests on noaa.gov for the specified zip code Displays.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Web Authoring with Dreamweaver. Unit Objectives  Be able to define keywords: HTML, HTTP (protocol), browser, web server, client/server, tag, attribute,
IT533 Lectures ASP.NET AJAX.
Since you’ll need a place for the user to enter a search query. Every form must have these basic components: – The submission type defined with the method.
John Maver (978)
AJAX Use Cases for WSRP Subbu Allamaraju BEA Systems Inc WSRP F2F Meeting, May 2006.
AngularJS $resource service. Add angular-resouce: Add the dependency: angular.module('myApp', ['ngResource']); Configure.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
Informatics Computer School CS114 Web Publishing HTML Lesson 4.
Linked Data & Semantic Web Technology Development of Twitter Applications Part 2. Twitter for Websites Dr. Myungjin Lee.
Tutorial 6 Working with Web Forms
Video API and Coding Graduate Seminar Dr. Jinan Fiaidhi
CSE 154 Lecture 11: AJAx.
a standard for the social web
CS 371 Web Application Programming
Data Virtualization Tutorial… CORS and CIS
The EBSCOhost iPhone Application
Subbu Allamaraju BEA Systems Inc
CS3015 Beacon Module 4 Messenger & Setting Preferences
Holdings Management Adding, Editing, and Assigning Notes
Ajax Control Toolkit.
JavaScript Functions.
Testing REST IPA using POSTMAN
Unit 27 - Web Server Scripting
CSE 154 Lecture 11: AJAx.
Google API Key.
CSE 154 Lecture 22: AJAX.
The EBSCOhost iPhone Application
jQuery form submission
Forms, cont’d.
Servlet APIs Every servlet must implement javax.servlet.Servlet interface Most servlets implement the interface by extending one of these classes javax.servlet.GenericServlet.
Lesson Nine: Epic Appointment Scheduling Referrals Reports
HTTP GET vs POST SE-2840 Dr. Mark L. Hornick.
Lecture 5: Functions and Parameters
Lesson Nine: Epic Appointment Scheduling Referrals Reports
Lesson Nine: Epic Appointment Scheduling Referrals Reports
Lecture 12: The Fetch Api and AJAx
Adding , Editing, and Assigning Full Text Finder Links
(CS Team Member) Location, Date Receipting for Property
Client-Server Model: Requesting a Web Page
HTTP and HTML HTML HTTP HTTP – Standardize the packaging
Presentation transcript:

Activities in OpenSocial CS : Survey of Contemporary Technologies

Activities Actions carried out in a social application Activities are typically posted in an updates page in your container The OpenSocial API enables posting of activities and reading from a user’s activity stream (assuming the viewer is authorized to do so)

opensocial.Activity Class that represents an Activity object opensocial.newActivity(params) returns a new instance of Activity  params is an array that indicates activity details (title, body, etc) Methods:  getField( key ): returns a value  setField( key, value): sets field to value  Possible values for key: ‘title’, ‘body’, etc.

Posting an activity opensocial.requestCreateActivity(a,p,f)  a: Activity object  p: priority (‘high’ or ‘low’)  f: callback function once request has been processed (can be used to refresh container webpage)

Example var count = 0; function postActivity() { alert("about to post activity"); var title = 'this is activity post: ' + ++count; var params = {}; params[opensocial.Activity.Field.TITLE] = title; var activity = opensocial.newActivity(params); opensocial.requestCreateActivity(activity, 'high', function() { alert("activity posted; count="+count); }); alert("activity post request sent"); } Click on this button to post an activity:

Reading from an activity stream An Activity stream can be requested through a DataRequest object newFetchActivitiesRequest(idspec) creates the request item  idspec: specifies from which people to fetch activities Note: actual data will be retrieved and handled within the callback function  when processed, a Collection object is returned

Example function loadActivities() { var req = opensocial.newDataRequest(); var person = opensocial.newIdSpec({ "userId" : "VIEWER"}); req.add(req.newFetchActivitiesRequest(person), 'acts'); req.send(onLoadActivities); } function onLoadActivities(data) { var myActs = data.get('acts').getData(); var html = ‘ '; myActs.each(function(activity) { html += gadgets.util.unescapeString(activity.getField('title')); html += ' '; }); document.getElementById('acts').innerHTML = html; }

About activities The OpenSocial API supports activities so that apps may generate app messages to be posted in a container, visible to the user and the user’s friends Currently supported differently by the different containers  Authorization (e.g., friendster allows activity stream reading, orkut and igoogle do not, by default; orkut and igoogle allow posting, friendster does not)  Rendering of activity content Try out  the two sample applications out on your respective containers  version 5 of the gift giving application from the opensocial tutorial (wiki.opensocial.org)