Profile pics album in Facebook Desktop

Aug 22, 2008 at 1:58 PM
Hi everybody,
After searching a bit on Google, I did not find an option to retrieve a users' profile album pics.

Does anyone know how to do this? Any solution (FQL or other) would be awesome! :D
Aug 22, 2008 at 2:42 PM
Edited Aug 22, 2008 at 3:00 PM
While I'm waiting to see if there's a solution from the FB Toolkit side, the solution to this is similar to the "Search box" / "View Friendslist" solution I posted here.

The url for a user's profile pictures is:[USER_UID]&v=photos

Which you can navigate to using the Webbrowser class' Navigate(string url) method (if that user is a friend of yours or has a public profile).

Each picture on the profile is linked like this:[PID]&op=1&o=global&view=global&subj=[USER_ID]&id=763164774

I am not sure what that last id is ... Haven't checked yet.

From this I think you should be able to generate a photos list of some sort with the respective PID which you can review properties such as tags and others (mentioned in the API).

The only problem that I see with this solution is that the generated HTML only loads the first page of the profile photos.  So if the user has more than one page full of photos, I don't see how you can see the photos on the other pages.

You'll notice that when you click on "Page 2" for instance, it does some kind of re-organizing, but not change in URL...

This is the HTML code that deals with the page navigation on the profile pictures:

<ul class="pagerpro" id="pag_nav_links">

<li class="current"><a href="#" onclick="new photoTabPager(1,1, {&quot;id&quot;:[USER_ID],&quot;vm&quot;:&quot;photosofme&quot;}, &quot;photos&quot;, &quot;photosofme_wrapper&quot;, &quot;photosofme_wrapper_pager&quot;); return false;">1</a></li>

<li><a href="#" onclick="new photoTabPager(1,2, {&quot;id&quot;:[USER_ID],&quot;vm&quot;:&quot;photosofme&quot;}, &quot;photos&quot;, &quot;photosofme_wrapper&quot;, &quot;photosofme_wrapper_pager&quot;); return false;">2</a></li>

<li><a href="#" onclick="new photoTabPager(1,2, {&quot;id&quot;:[USER_ID],&quot;vm&quot;:&quot;photosofme&quot;}, &quot;photos&quot;, &quot;photosofme_wrapper&quot;, &quot;photosofme_wrapper_pager&quot;); return false;">Next</a></li>


From this you can discern how many pages there are and perhaps generate new HTML page?

If someone can post a working example code of switching pages on the profiles pics page that could be helpful.

Also, I do believe that both of my solutions can be wrapped inside the FacebookToolkit to extend the current FB APIs in the FB Toolkit.  Any takers?

Any comments?
Aug 25, 2008 at 12:22 PM
Whereas this approach might work, it wouldn't surprise me if Facebook didn't approve of this. You may want to check the terms of service and other related docs to see if this is explicitly forbidden.  They seem to be very touchy about the correct use of the 'Platform' and, since this is circumventing it, I doubt you'd get an application approved that took this approach.  I also doubt for this reason it'd ever get included in the Toolkit.