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

string FlickrNet::Flickr::AuthCalcUrl ( string  frob,
AuthLevel  authLevel 
) [inline]

Calculates the URL to redirect the user to Flickr web site for authentication. Used by desktop application. See AuthGetFrob for example code.

Parameters:
frob The FROB to be used for authentication.
authLevel The AuthLevel stating the maximum authentication level your application requires.
Returns:
The url to redirect the user to.

Definition at line 585 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 + "frob" + frob + "perms" + authLevel.ToString().ToLower();
                  hash = Md5Hash(hash);
                  string url = "http://www.flickr.com/services/auth/?api_key=" + _apiKey + "&perms=" + authLevel.ToString().ToLower() + "&frob=" + frob;
                  url += "&api_sig=" + hash;

                  return url;
            }


Generated by  Doxygen 1.6.0   Back to index