tam7t / photograbber

Download photos from Facebook
GNU General Public License v3.0
80 stars 41 forks source link

Maximum of 400 photos can be retrieved #1

Open CalumJEadie opened 11 years ago

CalumJEadie commented 11 years ago

Discussed in "400 tagged photos" issue at http://photograbber.org/known-issues.html.

Duplicate of https://code.google.com/p/photograbber/issues/detail?id=67&sort=status.

Reported by nos...@gmail.com, Jul 8, 2011

What steps will reproduce the problem?

  1. Run photograbber
  2. compare photograbber's numbers to Facebook's number of photos of you
  3. The numbers are different

What is the expected output? What do you see instead?

I expect it to grab all photos where I am tagged but it does not. Photograbber grabs 1015 > photos but if you view my profile, it shows 1374 photos of me.

Comment by to...@ourbunny.com, Mar 16, 2013

I believe the original issue was a permissions problem, but it seems facebook has changes something to where only 400 most recent tagged photos are returned by their API. I will look into this further and likely file a bug with facebook.

CalumJEadie commented 11 years ago

@tam7t: Great work on PhotoGrabber!

I'm keen to look into this and see if there's anything we can do to work around the Facebook API limitations.

@tam7t: Before I get stuck in I was wondering if you had had any luck so far looking into it and any pointers for getting started? Specifically, I was wondering if you would mind pointing me in the direction of the documentation for the API call that appears to be limited and the call site?

Cheers!

tam7t commented 11 years ago

Relevant stackoverflow: http://stackoverflow.com/questions/14040405/photo-tags-query-response-of-max-400-elements

Some older information on the way Facebook limit's and permissions work: https://developers.facebook.com/blog/post/478/

This photo app also runs into the 400 tagged photo limit: https://play.google.com/store/apps/details?id=com.giannz.photodownloader

I have done a few searches of the Facebook API bug tracker and haven't found the 400 photo limit mentioned there or in any of Facebook's documentation. I haven't gotten around to filing a bug report myself either, so that might be a good first step.

Pseudocode of a possible work around:

tag_list = []
for friend in me.friends:
    for album in friend.albums:
        for pic in album:
            if me in pic.tagged: tag_list.append(pic)

But this would require a huge number of requests (especially using the GraphAPI) and would likely run into throttling limits.

Hope this information helps. Thanks for taking an interest in PhotoGrabber!

CalumJEadie commented 11 years ago

That's awesome, thanks @tam7t. Hopefully I might be able to give that a go over the next couple of weeks.

JamieMason commented 11 years ago

+1 for this one, thank you.

Dragonize commented 11 years ago

@tam7t : Just wondering if this issue is sorted out

CalumJEadie commented 11 years ago

Check out http://socialsafe.net/, it's desktop application for backing up social web applications, like Facebook and LinkedIn. I've just started using it and it appears to be able to download all your facebook photos so (a) might serve the purpose of photograbber but also (b) may be able to reach the developers to work out how they did it, they might be open to sharing the implementation, I guess depends on whether they consider that know how to be a core part of their business model or not.

Sammy1Am commented 10 years ago

Has there been any progress or findings on this issue? Most of the other options for downloading photos don't preserve the data the same way PhotoGrabber does, but I've been tagged in more than 400 photos.

Even if the Facebook API is limiting the request to 400 photos, it should probably also be providing some sort of pagination feature that would allow retrieving the rest of the photos. If someone familiar with the Facebook API could at least point me in the right direction, I may attempt to fork the code soon and get this working.

CalumJEadie commented 10 years ago

Not that I'm aware of I'm afraid @SammyIAm!

Sammy1Am commented 10 years ago

Yeah, I looked into it more, Facebook's just not providing any more after 400, regardless of paging. I've ended up manually extracting a list of all the photo ids, and I'm working on writing some code to just download them all that way. Tedious, but I only need to do it once.

MicFin commented 10 years ago

+1 for fixing this as only retrieving 400 of XXX photos renders the app not able to perform what people expect it to.