Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

string FlickrNet::Flickr::AuthCalcWebUrl ( AuthLevel  authLevel  )  [inline]

Calculates the URL to redirect the user to Flickr web site for auehtntication. Used by Web applications. See AuthGetFrob for example code.

The Flickr web site provides 'tiny urls' that can be used in place of this URL when you specify your return url in the API key page. It is recommended that you use these instead as they do not include your API or shared secret.

Parameters:
authLevel The AuthLevel stating the maximum authentication level your application requires.
Returns:
The url to redirect the user to.

Definition at line 610 of file Flickr.cs.

            {
                  if( _sharedSecret == null ) throw new FlickrException(0, "AuthGetToken requires signing. Please supply api key and secret.");

                  string hash = _sharedSecret + "api_key" + _apiKey + "perms" + authLevel.ToString().ToLower();
                  hash = Md5Hash(hash);
                  string url = "http://www.flickr.com/services/auth/?api_key=" + _apiKey + "&perms=" + authLevel.ToString().ToLower();
                  url += "&api_sig=" + hash;

                  return url;
            }


Generated by  Doxygen 1.6.0   Back to index