Archive for the ‘Flickr’ Tag

Hey Flickr, Where Did My Statistics Go? The CouchBase Connection. Part IV   Leave a comment

We interrupt this series to take a side trip concerning application logging.  The series begins here. NLog is an excellent open source logging project available from NuGet and other sources.   The sample code for this blog post can be found HERE. Although this is a kitchen sink implementation (Log to files, event logs, database, SMTP whatever) I will be using it as a simple way to log text information to files.  Once you have created a Visual Studio Project open Tools / NuGet Package  Manager/Package Manager Console.  From Here you can add NLog to your object with the command:

PM> Install-Package NLog

This will install NLog, modify your project and add a project reference for NLog.  Although NLog targets and rules can be managed programmatically, I 
normally user the configuration file: 


You can set this up using the Package Manager Console with the command:

PM> Install-Package NLog.Config

Configuration File Setup

The NLog config file is then modified to define “targets” and “rules”.  The former defines where log entries are written and the latter define which log 
levels are written to which targets.  A file based target section might look like:


   DLR.Flickr/Debug.txt” archiveNumbering=”Rolling”   archiveEvery=”Day” maxArchiveFiles=”7″ ConcurrentWrites=”true”/>

<target name=”logfile” xsi:type=”File” layout=”${message}”    fileName=”C:/temp/DLR.Flickr/Info.txt”  archiveNumbering=”Rolling”  archiveEvery=”Day” maxArchiveFiles=”7″ ConcurrentWrites=”true”/>

<target name=”Errorsfile” xsi:type=”File” layout=”${message}” fileName=”C:/temp/DLR.Flickr/Error.txt” archiveNumbering=”Rolling”  archiveEvery=”Day” maxArchiveFiles=”7″ ConcurrentWrites=”true”/>

<target name=”Fatalfile” xsi:type=”File” layout=”${message}”  fileName=”C:/temp/DLR.Flickr/Fatal.txt” archiveNumbering=”Rolling”  archiveEvery=”Day” maxArchiveFiles=”7″ ConcurrentWrites=”true”/>


where name is the symbolic name of the target xsi:type defines this as a file target.  If you are controlling the layout of the log entry set layout to “${message}”.  Given that we are using xsi:type as File we can use fileName to set the physical location of the log file.  The value of fileName can be changed programmatically at runtime but I will not give examples here.

NLog defines five Log levels:  Debug, Info, Warn, Error and Fatal.  These levels are defined in an enum and have the names have no special significance except as you define them.  The Rules section of the config file defines which Log Levels are written to which targets. A given level can be written to zero to many targets.  My Rules section typically looks like:


<logger name=”*” minlevel=”Debug” maxlevel=”Debug” writeTo=”debugfile” />

<logger name=”*” minlevel=”Info” maxlevel= “Info” writeTo=”logfile” />

<logger name=”*” minlevel=”Warn” maxlevel=”Warn” writeTo=”Warnfile” />

<logger name=”*” minlevel=”Error” maxlevel=”Error” writeTo=”Errorfile” />

<logger name=”*” minlevel=”Fatal” maxlevel=”Fatal” writeTo=”Fatalfile” />

More complex rules like the following are possible:

    <logger name=”*” minlevel=”Error” maxlevel=”Error” writeTo=”Errorfile” />

       <logger name=”*” minlevel=”Error” maxlevel=”Fatal” writeTo=”Fatalfile” />

NLog initialization at runtime is very simple.  Typically you can you a single line like:

using NLog;

static Logger _LogEngine = LogManager.GetLogger(“Log Name”);

this need only be called once.

The simplest NLog log call (given the definition layout=”${message}”  ) would look like:

_LogEngine.Log(NLog.LogLevel.Info, “Info Message”);

We can extend this quite simply.  I have a single class extension providing a simple extension of NLog on Git Hub.  You can find it here.  Specifically I have provided wrapper methods for each NLog.LogLevel and support for Exception Stack Dumps.  Include this file in your project (after installing NLog and NLog config) then you can write:

using DLR.Util;

namespace DLR.CCDB.ConsoleApp


    class Program


static void Main(string[] args)


string _CorrelationID=System.Guid.NewGuid().ToString();

CCDB cbase = new CCDB { CorrelationID = _CorrelationID };

cbase.Client = CouchbaseManager.Instance;

NLS.Info(_CorrelationID, “Helllo, CouchBase”);


throw new ApplicationException(“My Exception”);

}catch(Exception x){





_CorrelationID is supported here so in multiuser situations (like WebAPI) we can identify which messages where written by which task.  In a console app this is not strictly necessary.  The call to NLS.Info results in an output log line like:

DLR|20140909-152031037|2f8f89ce-51de-4269-9ae0-9313ad2a0243|Helllo, CouchBase|


  • DLR is the Log Engine name (more than one engine can write to a given log file);
  • 20140909-152031037 is the terse timestamp of the form: YYYYMMDD-HHMMSSmmm; and
  • Hello, CouchBase is our text message

My call:


would result in a log line like:

DLR|20140909-152544801|46e656cd-4e17-4285-a5f3-e1484dad2995|Error|Error Data. Message: [My Exception]Stack Trace:  DLR.CCDB.ConsoleApp.Program.MainString args|

where Error is my message;

Error Data. Message: [My Exception] is the Message in ApplicationException; and

Stack Trace:  DLR.CCDB.ConsoleApp.Program.MainString args| is the stack dump.

NLS will handle nested exceptions and stack dumps but we are only showing a single un-nested exception in this example.

OK! That’s it for this post.  We will, hopefully return to couchBase and the Flickr API in the next post.

Posted 2014/09/09 by Cloud2013 in GitHub, Microsoft, NLog, NuGet

Tagged with , , ,

Hey Flickr, Where Did My Statistics Go? The CouchBase Connection. Part III   1 comment

This is the third post in this series on how to harvest statistical data from your (or a friend’s) Flickr Picture View
data.  The series begins
here.  Today we are looking at CouchBase as a noSQL database to store our Flickr data.  This post will get as far as getting the shell of a console application up and will defer example code samples for the next blog post.

CouchBase  iscouchbase a commercialized version of the public domain project
Apache CouchDB.  CouchDB is open source and CouchBase is not.  Both support API libraries for .Net and Java.  Commercial development with CouchBase is NOT free.  The CouchDB wiki lists five active C# libraries for CouchDB.  CouchBase supports a many API libraries including .Net and Java.  I have written about CouchDB and Ruby in a prior series of posts which can be found here. Both systems support multi-server nodes and concurrency controls.  Neither of these features will be touched on in the post.  Our focus here will be on an introduction to the minimum necessary administration skills and API coding to help us with our goal of storing information about Users, Photos and View Counts through time.  Along the way we will also discuss JSON Serialization / Deserialization using Newtonsoft.JSON, open source application Logging with NLog.  I will defer the discussion of CouchBase views for a subsequent post.

Data Model Overview.

Ultimately we want to store information about each User. For each user we will store information for one or more Photo and for each Photo, information on one or more View Counts.  Users and Photos have their own Primary Key, supplied as an ID field from Flickr.  Our view counts will be collected each day and the Primary Key of the Counts is represented by the date the view count data was collected.  This could be modeled into a traditional RDBMS in third normal form, but this pattern is also most naturally represented as a nesting of lists of objects within container objects.  Rather than say we are storing nested objects it is more typical today to say that this data can be thought of as a structured Document.  The most natural way to store and access this data is by simple (or compounds of ) primary keys.  When we get to the point where we are doing manipulation of the data for statistical analysis and summary our most natural mode of access will be by a key composed of the User ID and Photo ID and iterating there view counts by Date ID (or Date ID range).  A very simple way to model this is with a Key / Value noSQL database based on document storage (aka a Document Store).  We could call this design an object oriented database model but that would be old fashion.  Here is the visual of the data model:image

The full Document could be represented as a compound C# object:

   class CObject
public CUser User { get; set; }
public List<CPhoto> Photo { get; set; }

public class CUser
public string FullName { get; set; }
public string Username { get; set; }
public string UserId { get; set; }
public string APIKey { get; set; }
public string SharedSecret { get; set; }
public string Token { get; set; }
public string TokenSecret { get; set; }


public class CPhoto
public string ID { get; set; }
public string Title { get; set; }
public string ThumbnailURL { get; set; }
public List<CView> Views { get; set; }

public class CView
public string Date { get; set; }
public int Views { get; set; }

In this post we will setup a single server CouchBase instance and develop a single user application to manipulate documents in a CouchBase “bucket”.  We will not model the complete object in this post but deal with a simplified version of Photo Object while we get our feet wet on CouchBase CRUD operations and simple CouchBase server Administration.  To make things as simple as possible, for this post, we will be working only with a modified version of the CPhoto object (Document).


Getting The Stuff You Need.

Shopping List

Setting up a single node Windows CouchBase Server simple and basic administration is easy and fun. Download and run the installation of CouchBase from here. Fred willing all will go well and you will be placed at local page in your default browser. Bookmark this page and note the Port Number that has been assigned to the default instance of CouchBase.  On first use you will need to create an administrator Username and Password. I left the defaults alone for the Cluster and Server Nodes. Select the Tab Data Buckets.  You will need to decrease the Quota Usage limits for the default Bucket.  With the space you freed up, create a new Bucket called “DLR.Flickr.Example1” .  Here is what mine looks like:


And Here is the Bucket Settings Page:


OK.  Now take some time and review the documentation for the .Net SDK here.  You can read through or code along with the examples given there. Done? Now let’s get to work.

Starting to Code CouchBase

Open Visual Studio and select Tools/NuGet Package Manager/Package Manager Console and enter the command:

Install-Package CouchbaseNetClient

Create a new Visual Studio Console application.  I called mine:

DLR.CCDB.ConsoleApp and set the default namespace to DLR.CCDB.  Add references to:




[ If you can not resolve Newtonsoft.Json:  Right click on the root of the project and select: Manage NuGet Packages.  Search on Newtonsoft.Json.  Select Install on JSON.Net.  Now try adding the Newtonsoft reference again.]

Now is a good time to add the open source Logging solution to your project.  Select: Manage NuGet Packages.  Search on NLOG. Install both  NLog and NLog Configuration.

Open your App.Config project file.  You will need to make several changes.  Here is what mine looks like after the changes.

Red items are added manually by me (you) and the Blue entries are added by the NuGet Package manager during the sets you followed above.

<!–?xml version=”1.0″ encoding=”utf-8″?>
Couchbase.Configuration.CouchbaseClientSection, Couchbase” />
<servers bucket=”DLR.Flickr.Example1″ bucketPassword=””>
uri=”” />
<supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.5″ />
<assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
<assemblyIdentity name=”Newtonsoft.Json” publicKeyToken=”30ad4fe6b2a6aeed” culture=”neutral” />
<bindingRedirect oldVersion=”″ newVersion=”″ />
<assemblyIdentity name=”Enyim.Caching” publicKeyToken=”05e9c6b5a9ec94c2″ culture=”neutral” />
<bindingRedirect oldVersion=”″ newVersion=”″ />
<assemblyIdentity name=”NLog” publicKeyToken=”5120e14c03d0593c” culture=”neutral” />
<bindingRedirect oldVersion=”″ newVersion=”″ />

We are most interested in this section:

<servers bucket=”DLR.Flickr.Example1″ bucketPassword=””>
uri=”” />



This sets your default API calls to the bucket “DLR.Flickr.Example1” which you created above.  Although we will not develop the theme here you can override the default bucket during runtime to deal with calls to multiple buckets in the same program.


This sets your local node. the is a constant for development projects (localhost) and the 8091 is the port assigned to CouchBase during installation (double check this value on your system by navigating to the CouchBase Console page you added to your favorites list above.

While we are here let’s make some changes (without explanation why at this point) in NLog.Config (which was created when you installed NLog above).  Replace the entire contents of the file with (mind the wrap):

<!–?xml version=”1.0″ encoding=”utf-8″ ?>
<nlog xmlns=””
<target name=”debugfile” xsi:type=”File” layout=”${message}”  fileName=”C:/temp/DLR.Flickr/Debug.txt” archiveNumbering=”Rolling”  archiveEvery=”Day” maxArchiveFiles=”7″ ConcurrentWrites=”true”                        />
<target name=”logfile” xsi:type=”File” layout=”${message}”    fileName=”C:/temp/DLR.Flickr/Info.txt”  archiveNumbering=”Rolling”  archiveEvery=”Day” maxArchiveFiles=”7″ ConcurrentWrites=”true”                      />
<target name=”Errorsfile” xsi:type=”File” layout=”${message}” fileName=”C:/temp/DLR.Flickr/Error.txt” archiveNumbering=”Rolling”  archiveEvery=”Day” maxArchiveFiles=”7″ ConcurrentWrites=”true”                   />
<target name=”Fatalfile” xsi:type=”File” layout=”${message}”  fileName=”C:/temp/DLR.Flickr/Fatal.txt” archiveNumbering=”Rolling”  archiveEvery=”Day” maxArchiveFiles=”7″ ConcurrentWrites=”true”                    />
<logger name=”*” minlevel=”Debug” maxlevel=”Debug” writeTo=”debugfile” />
<logger name=”*” minlevel=”Info” maxlevel= “Fatal” writeTo=”logfile” />
<logger name=”*” minlevel=”Error” maxlevel=”Fatal” writeTo=”Errorsfile” />
<logger name=”*” minlevel=”Fatal” maxlevel=”Fatal” writeTo=”Fatalfile” />

We will get back to the details of this configuration file in the next post.

Write the minimum test code possible. 

Replace the contents of Program.cs with

using System;

using Couchbase;

using Enyim.Caching.Memcached;

using Newtonsoft.Json;

using NLog;

namespace DLR.CCDB.ConsoleApp

class Program
static void Main(string[] args)
CouchbaseClient client=new CouchbaseClient();




Build and run.  You should have no errors and client should not equal null after the call

CouchbaseClient client=new CouchbaseClient();

Success?  Take a break and we will continue next week.


Hey Flickr, Where Did My Statistics Go? OAuth, the Flickr API and You. (Part II)   1 comment

This is Part II of my series on the Flickr API and View Statistics.  You can find Part 1 here.

Assume a C# static class containing the critical information you need to identify yourself to Flickr:

public static class User{

public static string FullName {get;set;}

public static string Username {get;set;}

public static string UserId {get;set;}

public static string APIKey {get;set;}

public static string SharedSecret {get;set;}

public static string Token {get;set;}

public static string TokenSecret {get;set;}


Where APIKey and SharedSecret identify you (as the developer) to Flickr and Token and TokenSecret identify your relationship with the user which encodes what rights the user has granted to you.



FlickrNet defines a C# class OAuthAccessToken as:

 public class OAuthAccessToken : IFlickrParsable

        public string UserId {get;set;}

        public string USername {get;set;}
public string Token { get; set; }
public string TokenSecret { get; set; }


Given the above, to get things rolling we need to populate the FlickrNet OAuthAccessToken fields from our User class, and then instantiate FlickrNet’s FlickrManager:

OAuthAccessToken o = new OAuthAccessToken();





FlickrNet.Flickr _F = FlickrManager.GetAuthInstance(User.APIKey, User.SharedSecret);

Now we can loop through our photos getting the number of views for each photo on the datetime of the call.  We do these with paged calls to FlickrNet’s PeopleGetPhotos:

public PhotoCollection PeopleGetPhotos(PhotoSearchExtras extras, int page, int perPage);


Here is a simple loop to do so (without error checking):

int page=0;

while (true){

PhotoCollection photo = _F.PeopleGetPhotos(PhotoSearchExtras.Views, page++, 500);

     if (photo.Count == 0){ break; }

//Loop through each photo on the page:

foreach (FlickrNet.Photo p in photo)
//Save The Results

    SaveByID(User.UserID,p.PhotoID, p.Title, p.ThumbnailURL, p.Views); 



OK so far?  Note that in FlickrNet the Views field is defined as int? (which means that Views may contain a null) For our purposes here we will regularly convert those nulls to zeros.  The Views is not a delta but the total number of views (clicks since the photo was first posted up to the time in which the call is made).  Most of our next post will discuss one approach to collect and store views per day (or some other sample period).

ThumbnailURL can be used to retrieve the thumbnail of the image.  Note here that starting last month Flickr increased the default size of the thumbnails on new photos.  We will come back to this issue in a later post which deals with displays.  Speaking of display there is a field called LargeURL associated with each Flickr Photo object but we have had trouble working with.  Instead I will display full size images within Flickr using the formula:{full user name no spaces}/{photoID/in/photostream/


display the Flickr page for this photo.



Series continues here.


Posted 2014/07/29 by Cloud2013 in Flickr, FlickrNet, Photography

Tagged with , ,

Hey Flickr, Where Did My Statistics Go? OAuth, the Flickr API and You.   3 comments

In Yahoo’s misguided attempts to make Flickr a Phone photo sharing app like Instragram has radically redesigned the interfaces on both the desk top and on phones. Along the way they give you the option of uploading all of your phone photos directly to Flickr from your phone.  Which is nice, I guess, but Google and Microsoft and DropBox also offer the same service. I mean why would I want to dump my raw photos to Flickr when I, like most Flickr users, do our processing offline (in Photoshop for example) and post our best work to Flickr.  It would seem they are abandoning their core users (amateur photographers) to make way for the Instragram raw sewage stream of sunsets, meals and selfies.  Strange.  They are going to lose out to the Instragram / Facebook for that market and alienate the current group of core users. Is this what you want to see when you go to Flickr?  This:

selfie  Or this?  9475221248_2009bb3d34_o[1]

In order to accommodate the change Flickr, like all the big players offers a huge amount of cloud storage ‘for free’.  Something like two Gigabyte of photo storage.   Before the big changes at Flickr there was a special Flickr service “Flickr Pro” which for $29 a year got you, among other things, daily usage statistics (going back 30 days) of your photos.  Statistics were also available via the Flickr API (more on this in a moment). With the new Flickr statistics are gone and the Flickr API for statistics are also gone.

So I started digging into the existing, and still supported, Flickr API to see what was necessary to get usage statistics from Flickr for my photos using the Flickr APP.  I a C# programmer by profession so I started by looking at existing Flickr API libraries to leverage in this quest.  The godfather of C# Flickr API libraries is the FlickrNet API Library which is available in source under both the LGPL 2.1 license, and the Apache 2.0 license.

But First

This is a great and fully comprehensive library but to use it you need a couple of things to get started.  You must obtain a non-commercial personal API Key from Flickr (an application key). Apply for one here. But wait there is more.  Although the Flickr API is fairly straight forward you must, must, must, use Flickr’s implementation of OAuth with the application key to access Flickr data.  This post will be devoted to getting up and running with the Flickr API and Oauth.  Subsequent posts will discuss how to read photo view data and present a simple file database to store statistics.  Finally I will turn to using CouchDB and a Web front end to do the same work.  For this part we will switch over to Ruby and write our own simplified FLickrNet library.


OAuth, in its many variations, is all over the place on the web these days.  Every time you see a “Sign In with…” Facebook, Google, whatever you are using OAuth in action.  You must use the Flickr OAuth implementation  to access your own data on Flickr.  It is really not all that hard although at first blush it looks impossible.  Here is Flickr’s own overview:

Simple and fun you say!


It’s not that bad when you get into it.

Using code samples provided by the folks at FlickrNet here is a simple walk through of how to setup OAuth to access your own data for a desktop application.  First we will look at it as a simple cook book approach (in C#) and then give a much simpler view of OAuth than the above diagram.  And that will be it for this post.

  • Application Key

Get an application Key and a “shared” secret from Flickr (start here).

  • Grant Access Writes for this Application Key

Get the user (that’s you to grant you access to their (your) photos.

Prepare a special HTTP  Request to Yahoo which looks like{hash}&perms={permsValue}


{permsValue} is the access writes you are requesting to have granted to the caller

{hash} is a   Base64 encoded SHA-1 hash based on your Application Key and shared secret.  Not to worry FlickrNet handles the details for you.

Assuming you have created a FlickrManager class object (following the examples in the FlickrNet Samples Site) which includes your Application Key and shared secret the request URL is created as:

Flickr f = FlickrManager.GetInstance();  //you create this and encode your Application Key and Shared Secret into this class

requestToken = f.OAuthGetRequestToken(“oob”); //”oob” indicates that you are making a desktop request not a request from a web page

string url = f.OAuthCalculateAuthorizationUrl(requestToken.Token, AuthLevel.Read);//Request access to only what you need, in this case READ

opening this url will direct you the Yahoo login page and once logged in ask if you which to grant access for this application key to your data (photos and stuff) on Flickr.  When you answer YES Flickr will present to you on the screen (no call back as requested) an grant access key which is unique to your data and your application key.  This key is also called the“verifier” Write this down, we will use it below.

Here is what is happening in principle.  Flickr and you as the developer have a trust relationship where they grant you and application key for your use as a non-commercial developer.  The shared secret  is used as a key to encrypt messages between you (the developer) and Flickr.  This is used to request an access grant key between this application key (as a developer) and your data (as a Flickr user).  This is a one time process.

Get The OAuth Token

Each time we want to get  data back from Flickr we need to combine our Application Key, Shared secret and the access grant into a second specialized URL Get request to receive an OAUTH token which is time limited. In simple FlickrNet Code this looks like:

Flickr f = FlickrManager.GetInstance();
var accessToken = f.OAuthGetAccessToken(requestToken, verifier);
FlickrManager.OAuthToken = accessToken;

Here requestToken is a class object containing the Application Key and shared secret.  The field verifier contains the Grant Access Key we obtained above. The call to OAuthGetAccessToken builds a HTTP Get request to:{sig}


seg is a SHA-1 Hash of the input parameters. Let FlickrNet handle the details for you.

Ok So Far? Here is a picture:



Each data call to Flickr for data is an HTTP call and should be signed with the Application Key and the Access Object Token. Responses are returned in any of several formats of which XML and JSON are the most important.  Here is what a simple call to get photo data for a specific user (and returning XML) looks like:


api_sig is a hash of this call based on our Token Secret.  Not to worry we will use the FlickrNet assembly to generate this value.

Ok.  That’s enough for one post.  Get your Application Key from Flickr, Run the samples for FlickrNet to get your access key and generate an Access Object (OAuth Token), and in the next post we will dig in with using the Flickr API.


Part 2 continues here.






Posted 2014/07/03 by Cloud2013 in Flickr, Photography, Random Notes

Tagged with , ,

Social Photos: Transferring photos between Flickr, Facebook and Google+   1 comment

For photographers, professionals and hobbyists seeking a larger audience, FLICKR has a lot to recommend it.   According to Harold Davis:

If I conducted a survey of what people thought was the most important social media site for photographers, I bet most people would say Facebook, or maybe Twitter. But not so fast. Flickr is far and away the most important social media site for photographers—partly because it is a community aimed squarely at photographers…Using Flickr is an indispensable part of finding an audience; as photographer G. Dan Mitchell notes, “almost any photographer should have a presence there.” Landscape photographer Jeff Clow adds, “If you would have told me five years ago that I would have a large portfolio represented by Getty, I would have laughed out loud. But it has happened through the magic that I call Flickr magic.”

Simply put here are some reasons why you should use FLICKR if you want to improve the exposure of your photos and improve your photos

  • Simple Assignment of copyrights
    • Facebook’s terms and conditions states that they can use your  photos as they see fit  if you don’t have a prior copyright set on each photo.
    • Flickr makes copyright assignment simple (standard copyright: all rights reserved is the default) and allows several forms of the Creative Commons Licensing.
    • Creative Commons licensing in turn exposes your photos to the photo sharing and distribution network of Create Commons.
  • Ease of blocking right-click downloads
    • this is not the default but it is fairly straight forward to do.  Of course, the cleaver can always copy any image that is transmitted to your browser.
  • Accurate, simple GEO coding
  • Exposure your photos to other photographers
    • who may comment and critique your photos
  • Make your photos available to be reviewed by Getty Images for inclusion into their distribution network
  • Make your photos available to be search within the Creative Commons distribution network
  • Ease of uploading:
    • Browser uploading and a Flickr local client for uploading
    • Support for Flickr loading from within Adobe LightRoom and ACDSee (among others)

However, many folks like to use Facebook and Google+ for obvious social reasons and others may have commercial reasons.  What to do.  Loading photos separately to all three sites is time consuming and error prone. The problem of copy right registration remains on Facebook and Google+ unless you really want to let Mr. Zukerman make even more money of you.

Recently a new web based solution has appeared.  The site: Social Photos allows users to drag and drop photos between the three sites: Facebook, Google+ and Flickr.  I have been using the product for a few weeks and really like it.  I always post FIRST to Flickr and setup my copyrights and group. Then I use Social Photos to drag selected photos to Google+ (I have to admit that I don’t use Facebook for political reasons so I have not tried that interface but I assume it works as well as the Flickr to Google+).  Nice product, Highly recommended.

FlickRiver   Leave a comment

FlickrRiver.Com Is A Third Party Free Viewer for Flickr.Com Photos.

  • The display format is very nice (much nicer than Flickr itself);
  • The Display returns results in a stream (think Bing or Cooliris Image Displays); and
  • Is programmable via a RESTful interface.
  • Blog Badge is available

Visit it NOW
Here is a simple Badge from FlickRiver.
Click On The Badge To Launch FlickRiver Viewer


Clicking on this Badge will launch the FlickrRiver Web Page which will display Flickr photos in a very nice format.  The

Photos displayed are subject to parameters in the anchor tag’s href URL (We are talking REST here).

The Badge JPG is created on the fly and is referenced with a RESTful (but more obscure) URL

The HTML looks like this

<a href=””&gt;
src=”; border=”0″ alt=”dlr2008″ title=”dlr2008″/>

The jump href looks like:

<a href=””>

where dennisredfield is any flick user name.

where popular-interesting is a parameter of what to search for within the user name part of the URL.

There are constructions for this URL to provide searching Flickr Groups, all photos, etc.

See the web site FlickRiver For the full list of options.

The image tag is more complex, the new (randomized ) jpg is generated  (based on the URL parameters) on the fly each time the page containing the Flick River Badge markup is loaded. The (RESTful)  parameters of the image URL are harder to guessed at.  The image URLs I am using here were generated at the Web Site and I simply copied and pasted them into my markup.

Security Notes:

In order to access the Web Site to create badges, Flickr River requires you to

  • Have an active Yahoo/Flickr Account; and
  • To Grant FlickRiver access to your private photos (!)

What do you get for this?  Access to the badge markup generator and the nice Badge JPG customized to your search criteria.  So what can you do if you don’t want to give FlickRiver access to all of your Flickr photos?  Well, just hack the URLs themselves.  We are talking REST here.

Here is a FlickRiver Badge based on searches for the Most Recent Public Flickr photos tagged with the phrase ‘Lennon’:

Click On The Badge To Launch FlickRiver Viewer For A Lennon Search


The HTML markup for this looks like:

<a href=””>
<img src=”” border=”0″ alt=”Lennon” title=”Flickr Most Recent: Lennon”/></a>

Here Is the Same Badge Markup as generated by FlickRiver.  The JPG image tag is different.
View 'Lennon' photos on Flickriver

Here Is the Mark Up:

<a href=””><img src=”” border=”0″ alt=”View ‘Lennon’ photos on Flickriver” title=”View ‘Lennon’ photos on Flickriver”/></a>

Posted 2009/07/09 by Cloud2013 in Flickr, FlickRiver, REST

Tagged with , , , ,

%d bloggers like this: