Modified:
/trunk/bin/OrkutSampleApp.swf
/trunk/sample/SampleApp.xml
/trunk/sample/ext/myspace/MyspaceSampleApp.xml
/trunk/sample/ext/orkut/OrkutSampleApp.xml
/trunk/sample/ext/orkut/flex/OrkutSampleApp.mxml
/trunk/src/org/opensocial/client/ext/myspace/jswrapper/MyspaceJsWrapperClient.as
/trunk/src/org/opensocial/client/ext/orkut/jswrapper/OrkutJsWrapperClient.as
/trunk/src/org/opensocial/client/jswrapper/default.xml
=======================================
--- /trunk/bin/OrkutSampleApp.swf Thu Apr 1 00:53:40 2010
+++ /trunk/bin/OrkutSampleApp.swf Thu Apr 1 03:11:39 2010
Binary file, no diff available.
=======================================
--- /trunk/sample/SampleApp.xml Fri Oct 30 12:19:18 2009
+++ /trunk/sample/SampleApp.xml Thu Apr 1 03:11:39 2010
@@ -31,7 +31,7 @@
// Change nocache to version number when releasing other than random
timestamps.
var nocache = new Date().getTime();
- var baseUrl = 'http://www.unickway.org.cn/asClient/compact/';
+ var baseUrl
= 'http://code.google.com/p/opensocial-actionscript-client/source/browse/trunk/bin/';
var flashObjId = 'flashObj';
gadgets.flash.embedFlash(
=======================================
--- /trunk/sample/ext/myspace/MyspaceSampleApp.xml Tue Oct 20 10:03:37 2009
+++ /trunk/sample/ext/myspace/MyspaceSampleApp.xml Thu Apr 1 03:11:39 2010
@@ -20,7 +20,7 @@
// Change nocache to version number when releasing other than random
timestamps.
var nocache = new Date().getTime();
- var baseUrl = "http://www.unickway.org.cn/asClient/compact/";
+ var baseUrl
= "http://code.google.com/p/opensocial-actionscript-client/source/browse/trunk/bin/";
function loadSwf() {
@@ -41,6 +41,7 @@
// TODO: refine this function
+ // NOTE: Myspace doesn't support "gadgets.flash.embedFlash" function.
var DEFAULT_FLASH_ID = 'flashObj';
function embedFlash (swfUrl, swfContainer, opt_playerVersion,
opt_params, opt_upgradeMsgHTML) {
opt_params = opt_params || {};
=======================================
--- /trunk/sample/ext/orkut/OrkutSampleApp.xml Tue Mar 23 02:50:27 2010
+++ /trunk/sample/ext/orkut/OrkutSampleApp.xml Thu Apr 1 03:11:39 2010
@@ -27,80 +27,28 @@
<script type="text/javascript">
- var DEBUG = true;
// Change nocache to version number when releasing other than random
timestamps.
var nocache = new Date().getTime();
- var baseUrl = "http://as3testing.appspot.com/";
-
- function loadSwf() {
-
- embedFlash(
- baseUrl + "OrkutSampleApp.swf?bpc=" + nocache,
- "flashcontainer",
- "9.0.115.0",
- {
- width: "730",
- height: "500",
- quality: "high",
- wmode: "transparent",
- allowScriptAccess: "always"
- });
- gadgets.window.adjustHeight();
- };
-
-
- // TODO: refine this function
- var DEFAULT_FLASH_ID = 'flashObj';
- function embedFlash (swfUrl, swfContainer, opt_playerVersion,
opt_params, opt_upgradeMsgHTML) {
- opt_params = opt_params || {};
- // Check container element
- var container = document.getElementById(swfContainer);
- if (!container) return false;
-
- // Check version
- var version = opt_playerVersion.match(/(\d+)(?=[\.,]?)/g);
- var expectMajorVer = (version != null ? Number(version[0]) : 9);
-
- // Generate the flash object element
- var html = "";
- if (navigator.plugins &&
- navigator.mimeTypes &&
- navigator.mimeTypes.length) {
- // netscape plugin architecture
- html = '<embed src="'+ swfUrl +
- '" id="' + DEFAULT_FLASH_ID +
- '" name="' + DEFAULT_FLASH_ID +
- '" type="application/x-shockwave-flash"';
- for(var key in opt_params){
- html += key +'="'+ opt_params[key] +'" ';
- }
- html += '/>';
- } else {
- // PC IE
- html = '<object id="' + DEFAULT_FLASH_ID +
- '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
- var params = '<param name="movie" value="'+ swfUrl +'" />';
- for(var key in opt_params) {
- if (key == 'width' || key == 'height') {
- html += ' ' + key + '="' + opt_params[key] + '"';
- } else {
- params += '<param name="'+ key +'" value="'+ opt_params[key] +'"
/>';
- }
- }
- html += '>' + params + "</object>";
- }
- container.innerHTML = html;
- return true;
- };
-
-
- loadSwf();
-
+ var baseUrl
= "http://code.google.com/p/opensocial-actionscript-client/source/browse/trunk/bin/";
+ var flashObjId = 'flashObj';
+
+ gadgets.flash.embedFlash(
+ baseUrl + 'OrkutSampleApp.swf?bpc=' + nocache,
+ 'flashcontainer',
+ 9,
+ {
+ name: flashObjId,
+ id: flashObjId,
+ width: '730',
+ height: '500',
+ quality: 'high',
+ wmode: 'transparent',
+ allowScriptAccess: 'always'
+ });
+ gadgets.window.adjustHeight();
</script>
-
-
]]>
</Content>
</Module>
=======================================
--- /trunk/sample/ext/orkut/flex/OrkutSampleApp.mxml Tue Mar 23 02:50:27
2010
+++ /trunk/sample/ext/orkut/flex/OrkutSampleApp.mxml Thu Apr 1 03:11:39
2010
@@ -50,7 +50,6 @@
<![CDATA[
import
org.opensocial.client.ext.orkut.jswrapper.OrkutJsWrapperClient;
import com.adobe.serialization.json.JSON;
- import mx.controls.Alert;
import mx.collections.ArrayCollection;
import mx.events.ListEvent;
@@ -565,11 +564,12 @@
// ----------------- Update Appdata ------------------
private function updateAppdata():void {
var player:Object = {name:"Zakiyy",age:22,gender:"male"};
+ var data:Object = {player:player};
var req:AsyncDataRequest = new AsyncDataRequest(
Feature.APP_DATA_UPDATE,
new AppDataRequestOptions()
- .setDatum("player", JSON.encode(player)));
+ .setData(data));
req.addEventListener(ResponseItemEvent.COMPLETE,
updateAppdataEventHandler);
req.addEventListener(ResponseItemEvent.ERROR,
updateAppdataEventErrorHandler);
req.send(client);
@@ -595,6 +595,12 @@
}
private function
getAppdataEventHandler(event:ResponseItemEvent):void {
+ var data:Object = event.response.getData();
+ for (var key:String in data) {
+ logger.info("UserID:" + key);
+ logger.info("Player JSON String:" + data[key].player);
+ }
+
logger.info("get success!");
}
@@ -695,6 +701,7 @@
horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:Script>
<![CDATA[
+ import mx.controls.Alert;
import org.opensocial.client.base.Album;
import org.opensocial.client.base.Person;
import org.opensocial.client.base.MediaItem;
=======================================
---
/trunk/src/org/opensocial/client/ext/myspace/jswrapper/MyspaceJsWrapperClient.as
Sun Oct 25 03:47:09 2009
+++
/trunk/src/org/opensocial/client/ext/myspace/jswrapper/MyspaceJsWrapperClient.as
Thu Apr 1 03:11:39 2010
@@ -26,7 +26,7 @@
import org.opensocial.client.jswrapper.JsWrapperParsers;
/**
- * Extenstion of normal JsWrapperClient for myspace container. This
container doesn't support
+ * Extension of normal JsWrapperClient for myspace container. This
container doesn't support
* rpc and settitle feature. But it supports photos, albums, videos and
many other extensions.
*
* @author yiz...@google.com (Yizi Wu)
=======================================
---
/trunk/src/org/opensocial/client/ext/orkut/jswrapper/OrkutJsWrapperClient.as
Tue Mar 23 02:50:27 2010
+++
/trunk/src/org/opensocial/client/ext/orkut/jswrapper/OrkutJsWrapperClient.as
Thu Apr 1 03:11:39 2010
@@ -24,8 +24,8 @@
import org.opensocial.client.jswrapper.JsWrapperParsers;
/**
- * Extenstion of normal JsWrapperClient for orkut container. This
container doesn't support
- * rpc and settitle feature. But it supports photos, albums and many other
extensions.
+ * Extension of normal JsWrapperClient for orkut container. This container
doesn't support
+ * activities.get and requestShareApp feature. But it support albums and
many other extensions.
*
* @author zakiy...@gmail.com (Zhinan Yan)
*/
@@ -44,6 +44,7 @@
// Orkut does not support ACTIVITIES_GET and REQUEST_SHARE_APP features
removeFeature(Feature.ACTIVITIES_GET);
+ removeFeature(Feature.REQUEST_SHARE_APP);
// Orkut has some more extension.
=======================================
--- /trunk/src/org/opensocial/client/jswrapper/default.xml Tue Mar 23
02:50:27 2010
+++ /trunk/src/org/opensocial/client/jswrapper/default.xml Thu Apr 1
03:11:39 2010
@@ -1333,8 +1333,8 @@
var userId =
idSpec.getField(opensocial.IdSpec.Field.USER_ID);
var key;
var value;
- for (key in options['data']) {
- value = options['data'][key];
+ for (key in options['data']) {
+ value = gadgets.json.stringify(options['data'][key]);
break;
}
return req.newUpdatePersonAppDataRequest(userId, key,
value);