Facebook Photo Picker for Android

BY

On a recent project, we needed a widget that would allow users to select a photo from their Facebook albums. “Surely the new Facebook Android SDK must support this.” I thought. Alas, my hopes were unfulfilled. “Well, I bet there is a third-party solution for this!”, I surmised, but again, my search was for naught. At this point I decided to roll up my sleeves and do it myself.

The Facebook SDK does not readily support access to photos, which seems like a common use case for which they would expose a dedicated set of API calls. Instead, one needs to make specific Facebook Graph calls using the SDK’s Request class. One thing to pay attention to is the packaging of parameters to pass to the Request constructor. Not you use an android.os.Bundle to package the parameters, and the structure can be derived from the Facebook Graph API Explorer.

I’ve created an Android Library project so you can use this on your next project that needs access to Facebook photos. you can find it on Github here:

https://github.com/GrioSF/AndroidFBPhotoPicker.git

Note you’ll need to create your own Facebook App to support the FBPhotoPickerTestApp. You can find a nice getting started tutorial for the Facebook Android SDK here:

https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/

Feel free to fork and modify at will. If you have any suggestions for improvement, please leave a comment and I’ll get on it when I have a chance.

Here are some screenshots to give you an idea of what the UI looks like:

Select Album Screen
Select Album Screen
Select Photo Screen
Select Photo Screen

Leave a Reply

Your email address will not be published. Required fields are marked

Your comment

Your name, please

Your email, please

POSTED

March 22, 2013

SHARE POST

LOCATED IN

(147)
(57)

TAGS

(18)
(26)
(8)
(13)
(1)

CATEGORIES

HAVE A QUESTION ABOUT OUR SERVICES?

Ready to start on a project?

WANT TO SEE OUR WORK?

Visit our case studies page or request specific project examples.