How to get url that can be embed into a web page?

Feb 28, 2008 at 5:23 AM
Edited Feb 28, 2008 at 5:28 AM
Hi,

After uploading a photo using the LiveNet, how to get the photo's url that can be embed into a web page or blog? like http://tkfiles.storage.live.com/y1p1ev6eUMpQmNzURDYChLcsGK8Di9ExY7T2ECahHev6hbCbiMKQ3tEVKWCL6eu1c5Rug-z7uaQawI

Thanks
Coordinator
Feb 28, 2008 at 8:46 AM
If you look at the Sample Web Site that we have made in the source, you will see that the way to do it for now is to actually use an image handler, which you can use LiveNet for too. So in our example, we have:

Photo photo = m_photos.GetPhoto(new Uri(lbPhotos.SelectedItem.Value));
imgPhoto.ImageUrl = string.Format("./photo.lnet?url={0}&oh={1}", photo.PhotoPath, photo.Owner.UserId);

That will pull back the image and then display it in your webpage.

SL
Feb 28, 2008 at 2:51 PM
Yes, but I don't know which has a good performance, image handler and the url like http://tkfiles.storage.live.com/y1p1ev6eUMpQmNzURDYChLcsGK8Di9ExY7T2ECahHev6hbCbiMKQ3tEVKWCL6eu1c5Rug-z7uaQawI

Thanks
Coordinator
Feb 28, 2008 at 3:56 PM
Unfortunately, there's not way of getting that type of link from the API. There are permalinks coming soon, but not sure what sort of performance you will get from them as I have yet to be able to play around with them.