Can't Get Photo Albums

Oct 20, 2010 at 3:26 PM

Hi all,

I'm tryng to get the list of photo album of the user currently logged in, but I'm always get 0 results from the function. what i'm developing is a desktop application (winform) this is my code:

this.facebookService1.ApplicationKey = "<my app key>";

List<Facebook.Schema.Enums.ExtendedPermissions> prms = new List<Facebook.Schema.Enums.ExtendedPermissions>(); 

//I've added all permission...i'm not sure of wich is needed for get photo albums...

 prms.Add(Facebook.Schema.Enums.ExtendedPermissions.offline_access);            prms.Add(Facebook.Schema.Enums.ExtendedPermissions.photo_upload);            prms.Add(Facebook.Schema.Enums.ExtendedPermissions.rsvp_event);            prms.Add(Facebook.Schema.Enums.ExtendedPermissions.publish_stream);            prms.Add(Facebook.Schema.Enums.ExtendedPermissions.read_stream);            prms.Add(Facebook.Schema.Enums.ExtendedPermissions.share_item);            prms.Add(Facebook.Schema.Enums.ExtendedPermissions.status_update);            prms.Add(Facebook.Schema.Enums.ExtendedPermissions.create_event);

//connectin to FB

 this.facebookService1.ConnectToFacebook(prms) ;

IList<Facebook.Schema.album> myAlbums = facebookService1.Photos.GetAlbums(facebookService1.uid); 

foreach (Facebook.Schema.album Album in myAlbums)            {              

....other operations...


I can connect to FB, i can obtain my friends list (in other funcitons), but I CAN'T get my photo album (currently I have 16 albums on FB)

Please Help :-)

Oct 20, 2010 at 4:17 PM



I had the same problem.  But I discovered that since back in August/September Facebook decided to change extended permissions to break it down into smaller pieces.

I asked the same question "Are they going to implement the newer extended permissions" Answer "Use facebook c# SDK instead".


So it looks like this one is going down the plug hole.

Nov 3, 2010 at 5:35 PM

Sounds like you ran into the same issue I had a few months ago. If you download the source you can add the following into your extended permissions. 

namespace Facebook.Schema {

 public class Enums    {

public enum ExtendedPermissions      




then pass the new permission when you create your session

  DesktopSession session = new DesktopSession(API_KEY, nullnulltruenew List<Enums.ExtendedPermissions>() { Enums.ExtendedPermissions.user_photos, Enums.ExtendedPermissions.user_photo_video_tags });


Nov 4, 2010 at 3:06 AM

I added those two extended permission but still having no luck here. Any clues?

Nov 4, 2010 at 3:40 AM
Edited Nov 4, 2010 at 3:42 AM

I'm pulling this from two different places, so it's not complete, but should give you the right direction if we're doing something different. Best of luck!


DesktopSession session = new DesktopSession(API_KEY, null, null, true, new List<Enums.ExtendedPermissions>() { Enums.ExtendedPermissions.user_photos, Enums.ExtendedPermissions.user_photo_video_tags });
if (!String.IsNullOrEmpty(session.SessionKey))
api = new Api(session);

IList<album> FaceBookAlbums = api.Photos.GetAlbums();


Nov 4, 2010 at 3:50 AM code looks identical to the above. Have you confirmed that it actually worked? also is there anything special that you need to do on the appconfig?

Also in "api = new Api(session)", where did you get the Api class from?



Nov 4, 2010 at 4:10 AM

The Api class is in the Facebook.Rest namespace

Nov 4, 2010 at 4:25 AM

Interesting. So that worked nicely! It apparently does not work when I am using any other method to retrieve the photo / albums.

Thanks a bunch!

Nov 4, 2010 at 4:44 AM

Glad I could help