Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Have a nice day to all...
I am trying to retrieve User Images from flickr to My C# Mvc Application ..for getting Images from Flickr..so that i created an App register with Flickr. I had my API & Secret
..now this is my code for user to enter his credentials and redirects to My application

C#
public ActionResult Flickrcall()
{
           f = new FlickrNet.Flickr(API, SECRET);
           url = f.AuthCalcWebUrl(AuthLevel.Write);
}

and after redirecting another get call will makes by the flickr as per which i registered to call..Here is the get method..which is getting exception..

C#
[HttpGet]
public ActionResult Flickr()
    {

    try
    {
        oUser = (User)Session["oLoggedInUser"];
        MyLibraryViewModel model = new MyLibraryViewModel
        {
            ImageUrlList = new List<string>(),
            UserLibraryDetails = new List<UserLibrary>()
        };
        if (oUser != null)
        {
            f = new Flickr(API, SECRET);
            string frob = f.AuthGetFrob();
            OAuthRequestToken or = new OAuthRequestToken();
            url = f.AuthCalcWebUrl(AuthLevel.Write);
            or = f.OAuthGetRequestToken(url);
            f.OAuthAccessToken = or.Token;
            f.OAuthAccessTokenSecret = or.TokenSecret;
            Auth auth = f.AuthGetToken(frob);-->Invalid FROB(exception)
            f.AuthToken = auth.Token;
            FoundUser user = auth.User;
            FoundUser userInfo = f.PeopleFindByEmail(UserId/UserEmail);
            :
            :
            :
        }
  }
  catch(Exception Ex)
  {
   string mes=ex.message;
  }
}//End of Method

all the thing what i am doing is ..i need to get UserId or UserEmail..so that I can pass them to the method
C#
f.PeopleFindByEmail(UserId/UserEmail);
..
I am very Happy if i get any Suggestion/Advice's..towards right way..
1-->i have Api & Secret
2-->i calculated for Url
3-->i get Request token and Token secret
4-->I an trying to get FROB()--->Exception (Invalid Frob)
5-->Get OAuth Token from FROB
6-->assigning UserID/UserEmail to Identify User in flickr-->I struck here to get UserId
Posted
Updated 27-Feb-15 18:50pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900