Flickr Picture Extension for BlogEngine.NET 1.2

I put all of my family pictures on the flickr web site, and then if I need to have a picture from my account in my blog posts I just add it from there. This is not a hard process but now I have made it easier with this little Extension.

To make this extension work you will need an API key from flickr. I already had one before since I use it to display my pictures directly from flickr on this site (See my Photos Page). If you don't have it yet, get it at flickr's Services Page once you log into your account. You will also need your flickr id which is a number that looks like 123456789@N00. Once you have these two things you can use this extension.

To set up the extension to work with your API key and your account details you need to change few things in the code. On line 25 in the code you will see
"http://www.flickr.com/services/rest/?method=flickr.photos.getInfo&api_key=[KEY]&user_id=[ACC]&photo_id=[PHOTOID]"
Change the [KEY] to your API key and the [ACC] to your account details. You will notice that the url uses ?method=flickr.photos.getInfo this is the only function of the API we will use for this simple extension.

How does it work

First to make the extension work you will need to put in

The number is your picture id which your can get from flickr. (Its part of the url of every picture)

The extension converts this into a picture link to your flickr photo using the correct url information obtained from the XML file returned by the API method.

Download it and put it in your App_Code/Extensions/ and don't forget to change the [KEY] and [ACC] in the code.

FlickrPicture.zip (1.04 kb)

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: marygiel
Posted on: 11/9/2007 at 2:04 PM
Tags: ,
Categories: Development | Code
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (7) | Post RSSRSS comment feed

Custom Validators

Recently I had to write some simple custom validators so I thought I would share them with the world

CustomValidators.cs (3.52 kb)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: marygiel
Posted on: 10/22/2007 at 3:16 PM
Tags:
Categories: Code
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (1) | Post RSSRSS comment feed