Skip to content

Instantly share code, notes, and snippets.

@pmaruszczyk
Created July 17, 2012 09:15
Show Gist options
  • Save pmaruszczyk/3128268 to your computer and use it in GitHub Desktop.
Save pmaruszczyk/3128268 to your computer and use it in GitHub Desktop.
var activity,
paramsObj = {},
message,
recipient = "VIEWER";
vz.embed.getEmbedUrl({someparam: 'nvm'}, function(embedUrl) {
vz.embed.getStaticContentUrl('wall_post_img', function(staticUrl) {
paramsObj[opensocial.Message.Field.TYPE] = opensocial.Message.Type.PUBLIC_MESSAGE;
message = opensocial.newMessage(params.body + staticUrl, paramsObj);
opensocial.requestSendMessage(recipient, message, function (r) {
if (r.hadError()) {
GC.debug('Gadget: Activity Error: ' + r.getErrorMessage());
cb(false);
} else {
cb(true);
}
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment