Open Source Facebook Photo Gallery

facebookTwo months ago, I developed a facebook photo gallery which is FBConnect, php, facebook api and Jquery based. Today I released the full project as open source GPL license. So you can download the full project, modify and create derivative products for your own purpose or commercial usage.

Checkout the demo of the project http://thinkdiff.net/facebook/fblatestphotos

So basically the concept of the project is simple. If you visit this app, you’ll see the latest photos from your friends in facebook. On the left side it shows which albums are recently modified. When you click the album you’ll see all the photos of that album.

Open Source Facebook Photo Gallery

Open Source Facebook Photo Gallery

You can use this project code to learn Facebook Connect, Facebook api usage by php and javascript, html code to create a photo gallery. You can also learn how to use jquery and plugin to create nice effect like slider.

If you are serious and want to contribute for the project, don’t hesitate to contact me. Then I’ll add you as a Project member in the google groups.

Visit http://code.google.com/p/facebook-photo-gallery/ to know about the status of the project.

You can also download the full source code from http://facebook-photo-gallery.googlecode.com/svn/trunk/ or http://code.google.com/p/facebook-photo-gallery/downloads/list

About mahmud ahsan

Founder And Lead Programmer at iThinkdiff.net

, , ,

46 Responses to Open Source Facebook Photo Gallery

  1. Technology Story March 22, 2010 at 6:31 pm #

    Good application indeed, hope to use it.

  2. Lahiru March 22, 2010 at 8:21 pm #

    wow… gra8 application..

  3. excellent application.. just love it.

  4. Scorpio March 26, 2010 at 5:11 pm #

    Application what i am looking for….

    Thanks a lot!!!!!!!!!!!!!!!!!!!!!!!!!

  5. kumaran April 19, 2010 at 2:21 pm #

    Hi Mahmudd,

    How to download facebook album photos using apps. Please guide me… I am awaiting for your reply. Thanks

    Best Regards,
    Kumaran,
    Securenext.

  6. mahmud ahsan April 19, 2010 at 2:35 pm #

    @Kumaran,
    there are some applications that could help you. You can do a search in google and I hope you’ll get lots of result. Whatever, you can try https://addons.mozilla.org/en-US/firefox/addon/8442

  7. kumaran April 19, 2010 at 4:14 pm #

    Thanks, But I am asking about “Browse” open the folder and get file and upload …Same option “Submit Photo from Facebook”. Click the button go to user facebook photo album then select the file and download..I like this format..Could you guide me.

    Thanks in advance.

  8. ryan April 21, 2010 at 12:33 pm #

    What a really cool blog!

  9. vincus April 29, 2010 at 5:39 pm #

    help me please, why fql_query in fbobject.php on album or photo table return null? if this app is upload on my web and work fine on thinkdiff.net

  10. mahmud ahsan April 29, 2010 at 6:44 pm #

    @vincus, very sad to know but I also faced the same problem for my another app. After facebook released graph api I found some old api sometimes are not working perfectly among them fql_query is one also.

    I think you already know facebook released new fbconnect system, javascript sdk and graph api, after I fully understand all of those I will try to update this project.

    thanks

  11. Syed Sami Ul AHbab May 7, 2010 at 1:36 pm #

    do we comment on these pictures by photo commecnt

    • mahmud ahsan May 7, 2010 at 2:26 pm #

      No I didn’t implement the commenting system for this project.

  12. Stephen Reese July 18, 2010 at 4:43 am #

    How trivial do you think it would be to turn this into a photo gallery that could be used in a general PHP site? I have yet to find a method to display albums in a standard PHP site. This the following galleries have the functionality but they’re designed for WordPress, I’m looking for something that can stand alone.

    http://www.aaronharp.com/dev/wp-fotobook/
    http://www.justin-klein.com/projects/facebook-photo-fetcher

  13. Stephen Reese July 18, 2010 at 9:51 am #

    I just tried implemented the gallery and I’m getting the following error?

    Warning: Invalid argument supplied for foreach() in /var/www/domain.com/facebook-photo-gallery/fbobject.php on line 26

    Fatal error: Cannot use string offset as an array in /var/www/domain.com/facebook-photo-gallery/fbobject.php on line 40

  14. tomas August 6, 2010 at 8:36 am #

    Hi Mahmud,

    I tried to install this demo in my server but I get the exact same problem that I get when I try to see it through your site:

    Warning: Invalid argument supplied for foreach() in /home/mahmud/public_html/facebook/fblatestphotos/fbobject.php on line 26

    Fatal error: Cannot use string offset as an array in /home/mahmud/public_html/facebook/fblatestphotos/fbobject.php on line 40

    I see a comment where you posted that this issue occurs because of the new graph app.

    Do you think there’s any way around this?, because this demo is exactly what I was looking for.

    • mahmud ahsan August 6, 2010 at 8:59 pm #

      I developed this project long time ago. I think this project needs little update, that means, using facebook’s latest php library you can easily call old legacy api, but I couldn’t manage enough time to update it…

      • tomas August 7, 2010 at 3:21 am #

        Hi Mahmud, I did what you told me, I updated the facebook.php, and now the app goes to and infinite loop trying to connect.

        See it here: http://dhype.com/aplicacion/photo-gallery/

        Heres the app im trying to make: http://apps.facebook.com/picturefunappi/

        I would appreciate your help

        • tomas August 7, 2010 at 7:54 am #

          Or could you tell me how to get the profile photos from a user in to the aplication, thats really all I need.

          I’ve been trying all with the graph API, this is the base:

          $facebook->api_client->call_method(‘Photos.get’, array(‘subj_id’ => $uid));

          But It hasnt worked for me.

          My appi its working right now but I can only get the “profile picture from the user in a small size”, heres the url http://apps.facebook.com/picturefunappi/

  15. Sushil Gupta August 9, 2010 at 12:14 pm #

    Wao! Cool apps. I will use it in near.

  16. tomas August 13, 2010 at 4:32 am #

    Hi Mahmud. Sorry to bother you again.

    I manage to use the facebook gallery, I have modified it a lot but I can’t manage to get more albums from my friends.

    Only the latest album created by one of my friends is shown.

    Could you give me some tips on how to get like the last 5 albums created by my friends? Or maybe to get all my profile albums instead of my friends latest albums.

    Thank you very much, the gallery is amazing.

    • mahmud ahsan August 13, 2010 at 11:12 pm #

      If your friends restricts albums by privacy you can’t retrieve those albums.

      • Rahul June 6, 2011 at 3:22 pm #

        I’m getting this errors while trying to test the script on my server…

        Warning: Invalid argument supplied for foreach() in /home/mandril/public_html/subirfoto/album/fbobject.php on line 26

        Fatal error: Cannot use string offset as an array in /home/mandril/public_html/subirfoto/album/fbobject.php on line 40

        Nevertheless, this happens too on your demo!

        Would you help me to solve this?

  17. PepeR October 16, 2010 at 5:51 am #

    Hi Mahmud. Nice apps for Facebook!

    I’m getting this errors while trying to test the script on my server…

    Warning: Invalid argument supplied for foreach() in /home/mandril/public_html/subirfoto/album/fbobject.php on line 26

    Fatal error: Cannot use string offset as an array in /home/mandril/public_html/subirfoto/album/fbobject.php on line 40

    Nevertheless, this happens too on your demo!

    Would you help me to solve this?

    Thanks in advance!!

    • mahmud ahsan October 16, 2010 at 10:52 pm #

      Its not happening in my case, i just checked.

      • PepeR October 26, 2010 at 9:47 pm #

        Mahmud,

        It’s weird, I got the same errors on your demo:

        Warning: Invalid argument supplied for foreach() in /home/mahmud/public_html/facebook/fblatestphotos/fbobject.php on line 26

        Fatal error: Cannot use string offset as an array in /home/mahmud/public_html/facebook/fblatestphotos/fbobject.php on line 40

        BTW, great tutorials!! Keep it up!!

        Thanks again in advance!!

      • waka November 12, 2010 at 10:45 pm #

        mine too, same error

  18. Karl Friend November 8, 2010 at 9:07 am #

    Hello Mahmud,

    I just tried to use your demo but I seem to get the same problem as PepeR

    If you could fix or let us know how to fix you would truly be amazing

    Thanks in advance

  19. dummy December 17, 2010 at 5:10 pm #

    Warning: Invalid argument supplied for foreach() in /home/mahmud/public_html/facebook/fblatestphotos/fbobject.php on line 26

    Fatal error: Cannot use string offset as an array in /home/mahmud/public_html/facebook/fblatestphotos/fbobject.php on line 40

    • Rahul June 6, 2011 at 3:20 pm #

      I also got sama problem, please suggest me any solution. Its urgent

  20. Roca Wear Purses January 3, 2011 at 12:05 pm #

    Nice and thanks for sharing this info with us.
    Good Luck!

    Great Information and post! It is very informative and suggestible for the user of solar energy, May I think it can be beneficial in coming days…

  21. stampa foto February 4, 2011 at 7:10 am #

    if i try the application i receive the following error:

    Warning: Invalid argument supplied for foreach() in /home/mahmud/public_html/facebook/fblatestphotos/fbobject.php on line 26

    Fatal error: Cannot use string offset as an array in /home/mahmud/public_html/facebook/fblatestphotos/fbobject.php on line 40

    is possible to correct thsi bug ?

    • SyafzMagz March 18, 2011 at 12:23 am #

      me also got the same problem like u…

  22. Same Problem here May 16, 2011 at 11:06 pm #

    Same Problem here

    Warning: Invalid argument supplied for foreach() in /home/content/64/3621064/html/facebook/fbobject.php on line 26

    Fatal error: Cannot use string offset as an array in /home/content/64/3621064/html/facebook/fbobject.php on line 40

  23. Skripatch June 28, 2011 at 4:41 am #

    Man, you rule!
    I know you will find the time to fix this.
    POS for you :)

  24. kamesh July 8, 2011 at 5:06 pm #

    plz help me.this project is not run in my site.

  25. Gary July 11, 2011 at 3:45 am #

    Did anyone convert this project to the new FB SDK?
    If so, would you be kind enough to share?
    Thanks

  26. rithy August 12, 2011 at 11:49 am #

    Warning: Invalid argument supplied for foreach() in /home/mahmud/public_html/facebook/fblatestphotos/fbobject.php on line 26

    Fatal error: Cannot use string offset as an array in /home/mahmud/public_html/facebook/fblatestphotos/fbobject.php on line 40

    i test your demo and i get this error

    http://thinkdiff.net/facebook/fblatestphotos/home.php

  27. Chris September 13, 2011 at 10:53 pm #

    Install, created an APP and got this error.

    any ideas? running php5.2

    Warning: Invalid argument supplied for foreach() in /data/18/1/84/38/1573690/user/1695083/htdocs/clients/CRYC/site/objects/src/facebook-photo-gallery/fbobject.php on line 26

    Fatal error: Cannot use string offset as an array in /data/18/1/84/38/1573690/user/1695083/htdocs/clients/CRYC/site/objects/src/facebook-photo-gallery/fbobject.php on line 40

  28. Zante September 28, 2011 at 2:25 pm #

    This article needs to be removed. It’s old and doesn’t work anymore.

  29. Ptruk October 20, 2011 at 2:59 pm #

    please update this article

  30. vanle January 11, 2012 at 5:32 pm #

    this is the code to load photo from album ‘{$_GET['id']}’

    $params = array();
    $params['fields'] = ‘name,source,picture,id’;
    $params = http_build_query($params, null, ‘&’);
    $album_photos = $facebook->api(“/{$_GET['id']}/photos”);

    But, i dont know why it is limited for only 25 photo. It not load all photo in the album. Please help!!!!

  31. Peter August 7, 2012 at 11:45 pm #

    This is exactly what I am looking for… unfortunately like some of the other comments have stated, I can’t get it to work (I’m a newb). Any chance you are going to update?

Leave a Reply