Can Not Access Private Photos

Sep 26, 2014 at 7:38 AM
Edited Sep 26, 2014 at 8:17 AM
First of all Thank you for creating flickrnet it is very helpful.
I used below code to get acceess to private photos. But it wont get Private Photos. But Works on firends and other privacy options.
Also how can i get private and public photos all together? (we can only assign one pricvacy option)

Thanks!
public ActionResult FlickrNet(string frob)
    {

        Flickr flickr = new Flickr(ConfigurationManager.AppSettings["apiKey"],    ConfigurationManager.AppSettings["sharedSecret"]);


            flickr = new Flickr(ConfigurationManager.AppSettings["apiKey"],
                ConfigurationManager.AppSettings["sharedSecret"]);
            Auth auth = flickr.AuthGetToken(frob);
            flickr.AuthToken = auth.Token;


            PhotoSearchOptions options = new FlickrNet.PhotoSearchOptions();
            options.UserId = auth.User.UserId;

            options.SortOrder = PhotoSearchSortOrder.DatePostedDescending;

             options.PrivacyFilter =  PrivacyFilter.CompletelyPrivate;

               PhotoCollection photos = flickr.PhotosSearch(options);

            return View(photos);


    }
Marked as answer by tilan_aravinda on 9/26/2014 at 1:00 AM
Sep 26, 2014 at 9:01 AM
Edited Sep 26, 2014 at 9:01 AM
tilan_aravinda wrote:
First of all Thank you for creating flickrnet it is very helpful.
I used below code to get acceess to private photos. But it wont get Private Photos. But Works on firends and other privacy options.
Also how can i get private and public photos all together? (we can only assign one pricvacy option)

Thanks!
public ActionResult FlickrNet(string frob)
    {

        Flickr flickr = new Flickr(ConfigurationManager.AppSettings["apiKey"],    ConfigurationManager.AppSettings["sharedSecret"]);


            flickr = new Flickr(ConfigurationManager.AppSettings["apiKey"],
                ConfigurationManager.AppSettings["sharedSecret"]);
            Auth auth = flickr.AuthGetToken(frob);
            flickr.AuthToken = auth.Token;


            PhotoSearchOptions options = new FlickrNet.PhotoSearchOptions();
            options.UserId = auth.User.UserId;

            options.SortOrder = PhotoSearchSortOrder.DatePostedDescending;

             options.PrivacyFilter =  PrivacyFilter.CompletelyPrivate;

               PhotoCollection photos = flickr.PhotosSearch(options);

            return View(photos);


    }
Issue was fixed. We are re initliazing the flickr object before this works fine..