Welcome Developers!

in

Welcome!

in

Beta Release of the MySpace Custom Application Activities

As part of the OpenSocial 0.8 release , we're proud to announce a Developer Only release of MySpace Custom Application Activities. App Activities allow developers to get app-related events and messages into the Friends Update feed that appears on a user's home page.

What does a custom app activity event look like? Here's a portion of my Friend Update feed:

 Application update

 

As a developer, you'll be able to define your Activity Templates and then raise events using those templates in your OpenSocial applications. If you want to skip the chit-chat, you can get started right away by going to the template editor.

A templatelink appear under each app on the developers My Apps section. See screen shot below:

 Template Link

App Activities Key Limitations:

1. Only developers of the apps can successfully raise activity events.
2. Only developers of the apps will see the activity events in their Friend Updates feeds.
3. Apps can raise activity events *without* triggering the Activity Permissions pop-up

  • Point #3 is important because when Activitiesgo live, users of the apps will get a pop-up asking for their permission to notify their friends about the activity. This should have implications in developer's design decisions on when and how frequently to raise activity events.

Limitations, Restrictions and Known Issues

There is a full list of limitations, restrictions and bugs on the Activities Forum.

Getting Started with the Editor

The template editor is your primary point of interaction for defining activity templates. The template editor allows you to define and preview templates, and provides sample JavaScript for use in your apps. The variables and media items are only used for previewing your events. Please see the Getting Started documentation for a full walkthrough. 


Template Editor

 

Raising the event

The code sample below shows how to raise the event. (We are using some jQuery constructions here, but you probably be able to see what is going on).

 function sentActivity(){
 
var params = {};
  //tell which template we want to use
 
params[opensocial.Activity.Field.TITLE_ID] = "RateCar";
 
params[opensocial.Activity.Field.TEMPLATE_PARAMS] = {
         "carModel": "Tesla Roadster", "starCount": "10" }; 
  var activity = opensocial.newActivity(params);
 
//this will show a popup dialog asking the user if he really wants to sent the event.
  opensocial.requestCreateActivity(activity, opensocial.CreateActivityPriority.HIGH, opt_callBack);
}

function opt_callBack(response){
 
//only for developers, on a developers template we will give you some detailed error info back!
  if (response.hadError()){ 
     //using some jQuery magic
     $("#status").append("<span style='color:red'>" + response.getErrorMessage() + "</span>");
  }
}

 

We are looking forward to your feedback,

Marco, @nkur, Jitesh and the full MDP team. 

Published Nov 21 2008, 09:18 AM by &

Comments

 

FayEa said:

Will it be supported on external iframe apps?

November 24, 2008 1:45 PM
 

Siegmund said:

Hi,

I would like to integrate other image sources as well. Why is it restricted to user-photos. I.m.o it should somehow include images of the app as well, because the activity is triggered from there.

November 24, 2008 3:37 PM
 

rondata said:

Hi guys! Let us know what you think in the Activities forum:

developer.myspace.com/.../80.aspx

We need your feedback :)

November 24, 2008 10:29 PM
 

World At War said:

does not work for me

November 25, 2008 1:19 AM
 

rondata said:

have you guys looked at the known issues?

November 26, 2008 3:05 AM
 

Thomas said:

Will it be supported on external iframe apps?

December 4, 2008 4:57 PM
 

Mike Papper said:

Does it work on when using a template ID? I have tried with using a titile (not title ID) and the callback wasnever called?

January 9, 2009 11:46 AM
 

MySpace Developer Team said:

The spec for OpenSocial 0.8 has been finalized and MySpace’s implementation has been released. There

January 13, 2009 9:02 PM
 

Jason Zerbe’s logbook » working with MySpace Custom Application Activities said:

Pingback from  Jason Zerbe&#8217;s logbook &raquo; working with MySpace Custom Application Activities

July 28, 2009 8:41 AM
 

All for Good said:

Hi All

I tried to create an Event, in development mode.

The popup is saying always that "An error has occurred trying to send the Activity."

Status object : {"originalDataRequest_":null,"data_":null,"errorCode_":"internalError","errorMessage_":"Error sending request."}

Can someone help me out in this regards.

Thanks

Thangaraju R

August 24, 2009 10:18 PM