MySpace

From WidgetAvenue Wiki

Jump to: navigation, search

MySpace is the #1 social network in the world. The MySpace Developer Platform (MDP) allows developers to create applications that interact with MySpace members and their social data.

Contents

Creation of a specific app

Due to MySpace TOS, it is required to create a specific app for each widget, and to have it approved by MySpace. The creation of an application is very simple.

  • Create a new app and enter the following elements on the settings page
    • In the Canvas Surface tab:
      • App Type : External IFrame
      • Display Height: 500 (you may need to adjust this height depending on your widget size)
      • External IFrame Url: http://www.widgetavenue.com/wdg/loaders/msp_iframe.php?[Encoded list of args]
    • In the Profile Surface tab:
      • HTML/Javascript Source:
<div id='ldWidget'>
<script type = "text/javascript">
function getVariable(name, person) {
    var req = opensocial.newDataRequest();
    req.add(req.newFetchPersonAppDataRequest(person, name), name);
    req.send(getVariable_callback);
}

function getVariable_callback(response) {
    var variable = response.get('profileURL');
for (i in variable.getData()){

     url=(variable.getData()[i]['profileURL']);
}
os_param = {};
opensocial.makeRequest(url, function (data) {
document.getElementById('ldWidget').innerHTML =data;
},os_param);


}

getVariable('profileURL', 'OWNER');

</script> 


  • After creating the App, copy the OAuth Consumer Key (available on the Edit App Information tab) and the appId (displayed in the URL)
  • Create or open your metadata file, and add the following elements:
	<div class="msp">
		<div class="app_name">[appId displayed in the URL]</div>
		<div class="app_key">[OAuth Consumer Key]</div>
	</div>

DO NOT ENTER YOUR SECRET KEY IN THE METADATA FILE, BUT FAX IT TO WIDGETAVENUE.

The app will be ready to run when the secret key has been entered in the system by WidgetAvenue, and MySpace has approved the app.

Features

  • Once installed, the widget is displayed on 2 surfaces:
    • Inside the canvas page.
    • On the profile page of the user


Issues

  • Applications need to be approved by MySpace before they can be installed by any user. Otherwise, only the application's "friends" can install it. In order to get approved, you should pay attention to the following:
    • Remove links which trigger a download or send an e-mail(for example links to installation on desktop platforms). It is easy to customize the install and share windows
    • Make sure your widget is not cropped on the profile and canvas surfaces (adjust the heights if needed)
  • An icon/description bug exists if your developer account is set to a country that is outside the USA. To work around this:
    • Log on to your developer profile
    • Set your country to U.S.A
    • Go back to your application and re-upload and save your icons and description
    • Publish
  • The application key has to be provided to WidgetAvenue by phone or e-mail
  • The PostTo feature recently introduced by MySpace is not yet supported.
  • waJS is not supported on the profile. A waHTML only version is displayed.
  • When using the waHTML/waJS format, clicking on the widget on the profile will open the canvas page

Links

Personal tools