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
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..
[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;
}
}
all the thing what i am doing is ..i need to get UserId or UserEmail..so that I can pass them to the method
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