Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant' load some Facebook pictures URL #58

Open
lorenzoPrimi opened this issue Mar 5, 2014 · 2 comments
Open

Cant' load some Facebook pictures URL #58

lorenzoPrimi opened this issue Mar 5, 2014 · 2 comments

Comments

@lorenzoPrimi
Copy link

When trying to select a lot of pictures from Facebook I get the photo ID but not the URL, why does it happens?

2014-03-05 17:44:35.972 GrabKitDemo[11781:60b] did select photo : <GRKPhoto: 0x145eacb0 photoId:'10202696807254249' name:'(null)' caption:'Daje de carnava' actual images count:7 >
2014-03-05 17:44:37.798 GrabKitDemo[11781:60b] did finish, selected photos : (
"<GRKPhoto: 0x145eacb0 photoId:'10202696807254249' name:'(null)' caption:'Daje de carnava' actual images count:7 >"
)
2014-03-05 17:44:37.799 GrabKitDemo[11781:60b] the URL of the original image of the first selected photo is : (null)
2014-03-05 17:44:37.800 GrabKitDemo[11781:60b] the size of this image is : 0 x 0

@lorenzoPrimi
Copy link
Author

Looks like this problem happens only when there are pictures uploaded with full resolution (_o.png filename)
This is the only fix I have found so far, give me some feedback.

I modified those two boolean in GRKFacebookGrabber.m

BOOL sameWidth = ([(NSDecimalNumber*)[rawImage objectForKey:@"width"] compare:originalWidth] == NSOrderedSame || [(NSDecimalNumber*)[rawImage objectForKey:@"width"] compare:originalWidth] == NSOrderedDescending);
BOOL sameHeight = ([(NSDecimalNumber*)[rawImage objectForKey:@"height"] compare:originalHeight] == NSOrderedSame || [(NSDecimalNumber*)[rawImage objectForKey:@"height"] compare:originalHeight] == NSOrderedDescending);

@albertoramonj
Copy link

Thanks for the tip. I had this problem two weeks ago. It seems that GRKPhoto originalImage URL attribute is nil sometimes. However, GRKPhoto firstImageWithHeightGreaterThan returns several images with different resolution. So my workaround consisted in getting the biggest image of this list on GRKPickerPhotosList.h collectionView cellForItemAtIndexPath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants