Random Facebook Photo plugin released

A couple of the sites I’ve been working on recently have needed a way to display a randomly selected photo in the sidebar.  If you have a Flickr account, this is easy.  Benoit Gilloz’s Simple Flickr Photostream widget is what you’re looking for.  If you don’t have a Flickr account, though, because you keep all your photos on Facebook, there isn’t really an equivalent plugin.  So I decided to write one.

The Random Facebook Photo widget plugin does what it says on the label.  You provide an ID for a person or page on Facebook with photos that are public, and it selects a random photo from a random album and displays it on your page in the size of your choosing.  Facebook doesn’t actually set photo sizes to anything specific (although it does offer a good range of sizes from full screen to thumbnail), so it can take a little fiddling to get what you’re after, of you can force the photos to a fixed width in the widget options.

You can download the widget from the WordPress plugin repository.  As usual, if you have questions, problems, or suggestions, contact me, or leave a comment below.

4 Responses to “Random Facebook Photo plugin released”

Read below or add a comment...

  1. Destini says:

    I am having the same error code as Scott… what do I do?

  2. Hi, Thanks for the plugin. I was hoping to use it on the Habitat for Humanity website I manage, but I get the following error – Warning: array_rand() [function.array-rand]: First argument has to be an array in /data/home/genhab/websites/geneseehabitat.org/docs/wp-content/plugins/random-facebook-photo-widget/facebook photo widget.php on line 83 – is there anything I can do to fix it?

    • ed says:

      Hi Scott,

      Could you send me the page/person ID of the Facebook page you’re trying to pull photos from so I can have a look?

      Cheers,

      Ed

Leave A Comment...

*