post image

10 views
Skip to first unread message

ashcsi ashcsi

unread,
Jun 1, 2011, 7:07:48 AM6/1/11
to opensoci...@googlegroups.com
Hello All,

How do we post image, media in the opensocial orkut activity stream. I am using the following code:

    var params = {};  
    var image = opensocial.newMediaItem('IMAGE','http://path_to_png');
    params[opensocial.Activity.Field.TITLE] = "TEST TITLE";
    params[opensocial.Activity.Field.BODY] = "This is a sample text";    
    params[opensocial.Activity.Field.MEDIA_ITEMS] = image;
    var activity = opensocial.newActivity(params);
    opensocial.requestCreateActivity(activity, opensocial.CreateActivityPriority.HIGH, callback);

But the image is not getting displayed. Any ideas?

thanks
    ashy


Roberto Scattini

unread,
Jun 1, 2011, 8:57:10 AM6/1/11
to opensoci...@googlegroups.com
hello ashcsi,

i think mediaitems in activities are not supported, check this link:

regards!

Roberto

2011/6/1 ashcsi ashcsi <ashcs...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "orkut Developer Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/opensocial-orkut/-/bTBmQ1pyMGZ6TVFK.
To post to this group, send email to opensoci...@googlegroups.com.
To unsubscribe from this group, send email to opensocial-ork...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en.

Bruno Oliveira ("btco")

unread,
Jun 9, 2011, 10:03:26 PM6/9/11
to opensoci...@googlegroups.com
Hi,

You can post an image simply by using an "<img>" on the activity body.

-
Bruno Oliveira (Google)
Reply all
Reply to author
Forward
0 new messages