Embedding My Opera content (OEmbed)
By Cosimo Strepponecstrep. Tuesday, December 2, 2008 4:40:23 PM
Now you can embed photos and other My Opera content like avatars from external sites. It's been on our roadmap for some time.
We chose to embrace the OEmbed (www.oembed.com) "specification" for doing that.
OEmbed it's really simple. It uses JSON (or XML) as an interchange format, and the request and response types are really simple and straightforward. An OEmbed request has the following structure:
http://my.opera.com/service/oembed?url=<some_url>&format=json
The format is json by default and can be omitted, so a sample request to get information about MyOpera photo album looks like:
http://my.opera.com/service/oembed/?url=http%3A%2F%2Fmy.opera.com%2Fcstrep%2Falbums%2Fshow.dml?id%3D504322
This is one of my photo albums. The result is the following:
{
"author_name" : "cstrep",
"provider" : "My Opera Community",
"images" : {
"image" : [
"http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964560",
"http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964559",
"http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964556",
"http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964558",
"http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964531",
"http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964554",
"http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964557",
"http://my.opera.com/cstrep/albums/showpic.dml?album=504322&picture=6964555"
]
},
"author_url" : "http://my.opera.com/cstrep/",
"provider_url" : "http://my.opera.com/",
"version" : "1.0",
"type" : "link",
"title" : "Italian Day"
}
Note: if you have problems displaying the JSON code and you're faced with a download instead, try to instruct your browser to open application/json mimetype directly. In Opera, just go to the Tools menu, Preferences. Click on the Advanced tab, then Downloads on the left. You can see all the special mimetypes. Now click on Add, and insert the application/json mimetype and tell Opera to open it directly.
You can also recursively request information about a single picture, using:
http://my.opera.com/service/oembed?url=http%3A%2F%2Fmy.opera.com%2Fcstrep%2Falbums%2Fshowpic.dml%3Falbum%3D504322%26picture%3D6964560
The result is:
{
"width" : "2080",
"author_name" : "cstrep",
"provider" : "My Opera Community",
"author_url" : "http://my.opera.com/cstrep/",
"provider_url" : "http://my.opera.com/",
"version" : "1.0",
"height" : "1544",
"url" : "http://files.myopera.com/cstrep/albums/504322/100_2450.jpg",
"title" : "Giardinelli Beach. Sardinia.",
"type" : "photo"
}
So, there you have it, the filename of the picture, finally...
The base implementation for this OEmbed functionality is completely generic and open. Then we have a bunch of different plugins, like Photo, Avatar, Album, and so on... And it's really easy to add new ones.
We're now planning to use this API internally for new features already planned. Hopefully also widgets.opera.com will use OEmbed internally to access avatar pictures. Here's an example:
http://my.opera.com/service/oembed?url=http%3A%2F%2Fmy.opera.com%2Fcstrep%2Favatar.pl
If you prefer the xml format instead, you can append the format=xml argument to the URL, like in the following example:
http://my.opera.com/service/oembed?format=xml&url=http%3A%2F%2Fmy.opera.com%2Fcstrep%2Favatar.pl
Of course, not everything is accessible to any user. Private albums will remain private. Anyway, the main point of OEmbed is being able to share content, so... have fun.







Tamil # Wednesday, December 3, 2008 10:23:19 AM
Шуйский Николай [krigstask, Ŝtérkrìg]Sterkrig # Wednesday, December 3, 2008 10:42:27 AM
P.S. Tamil is everywhere!
DavidSchalandra # Wednesday, December 3, 2008 1:40:00 PM
Will try that in my xmas holidays.
mrmass # Wednesday, December 3, 2008 7:33:03 PM
jonpar # Thursday, December 4, 2008 1:39:43 AM
Dan Alexandrudantesoft # Thursday, December 4, 2008 7:00:28 AM
I'm not happy to notice the service has the same bug as my widget: for group photos, the URL assumes the wrong username for the album owner.
E.g. http://my.opera.com/365/albums/showpic.dml?album=649265&picture=8862030
Photo URL: http://files.myopera.com/vpalmeira/albums/649265/08%2012%2003.jpg
OEmbed: http://my.opera.com/service/oembed/?url=http%3A//my.opera.com/365/albums/showpic.dml%3Falbum%3D649265%26picture%3D8862030
But this should be easy to fix.
Cosimo Strepponecstrep # Thursday, December 4, 2008 9:27:24 AM
Dustin WilsonKhadgar # Thursday, December 4, 2008 3:08:23 PM
But thanks! I'm a glutton for punishment!
Khadra Warsame Penh Neangkhadwar_neang_666 # Friday, December 5, 2008 12:00:43 AM
MAY YOU HAVE MANY MORE .... Here is the embedding code that I'm using .... < img src="http://img.mocospace.com.edgesuite.net/user/images/3134/orig/photoalbum_31334908_user9400946-1.jpg""" />
MAY YOU HAVE MANY MORE .... The image are set to private at the place thats hosting the image ....
Charles SchlossChas4 # Friday, December 12, 2008 5:38:56 PM
I am not sure I have seen a blog without a post by Tamil
OEmbed looks like fun
DesertDawg # Thursday, December 18, 2008 12:12:12 PM
The requested URL /desertdawg/albums/633531/P2.jpg was not found on this server.
Dan Alexandrudantesoft # Saturday, February 14, 2009 7:49:48 AM
That's actually not needed, the 320 x 240 pics are obtained by splicing /thumbs and _thumb.jpg in the photo URL.
Cosimo Strepponecstrep # Saturday, February 14, 2009 8:30:52 PM
About the thumbnail URL, I think your suggestion was really appropriate, since we might want to change/move the tn URLs.
You don't want to rely on the current URL scheme...
We don't want too :-)
Dan Alexandrudantesoft # Friday, March 6, 2009 6:18:01 AM
As a suggestion, could the other MyO services be listed on http://my.opera.com/community/api/ ? I'm thinking of the RDFs' and feeds' technical details. Some words about the XMLs available for widgets.opera.com, too.
Cosimo Strepponecstrep # Friday, March 6, 2009 4:32:34 PM
Pavel Pavlovskijhoollis # Wednesday, August 11, 2010 7:05:17 PM