problem with GetExtendedPermission()

Jul 2, 2009 at 7:18 PM

Hi,

I am trying out the following piece of code to upload images to an Album.

            FileInfo fi = new FileInfo(@"C:\Picture 165.jpg");
            facebook.Types.Enums.Extended_Permissions en;
            en = facebook.Types.Enums.Extended_Permissions.photo_upload;

            if (!facebookService1.API.users.hasAppPermission(en))
                facebookService1.GetExtendedPermission(en);

            facebook.Schema.photo srr = facebookService1.photos.upload(Convert.ToInt64(albumid), "FDT", fi);
            Process.Start(srr.link);

The problem is after I have granted permission and close the pernmission dialog, it checks for permission once again. I cannot also handle the cancel properly. What is the best way to use GetExtendedPermission()?

 

Thanks,

Partha