Using Flash with open social

Open Social is a google api for social applications across multiple websites. With standard JavaScript and HTML, we can create apps that access a social network’s friends and update feeds.

I have used social api to create the Orkut Application, and found that it’s really very very easy to build orkut app.

Here is the sample app xml which you can use to create your orkut app.

//—– XML Starts from here

<?xml version="1.0" encoding="UTF-8"?>
 <ModulePrefs title="____YOUR_APP_TITLE____">
  <Require feature="opensocial-0.7"/>
 <Content type="html"><![CDATA[
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=",0,0,0" width="765" height="500" id="____YOUR_APP_ID____(This is name of your swf file with out extention, not orkut application id)" align="middle">
 <param name="allowScriptAccess" value="always"/>
 <param name="movie" value="____FULL_PATH_OF_YOUR_SWF____"/>
 <param name="quality" value="high"/>
 <param name="bgcolor" value="#ffffff"/>
 <embed src="____FULL_PATH_OF_YOUR_SWF____" quality="high" bgcolor="#ffffff" width="765" height="500" name="____YOUR_APP_NAME____" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage=""/>


//—–XML Ended


Now some points to remember

1. When you copy this code to any editor, don’t forget to replace smart-qoute with standard quotes.

2. As Application is on your domain only use full path like for all images, mp3, js or any file used in your app.

3. Use crossdomain policy file.

//—- Save this as crossdomain.xml and put it on same folder, where your .swf recides

<?xml version=”1.0″?>
<!DOCTYPE cross-domain-policy SYSTEM ““>
<allow-access-from domain=”*” />


Please update “allow-access-from domain” as per your need.

4. For any commnocation with social api use External Interface.

5. In object tag update “param-name” “allowScriptAccess”, from “sameDomain” to “always”

6. When you update the .xml file use &bpc=1 in URL, it will bypass the Orkut Application XML Cacheing, e.g.

Here are some useful Links

 Getting Started Videos (Must see!!!!!!!!!!!!!!!!!!!)

OpenSocial API Documentation

OpenSocial API Developer’s Guide (v0.7)

Orkut Documentation

Orkut Developer’s Guide