Giter Club home page Giter Club logo

bsfacebookimagepicker's Introduction

BSFacebookImagePicker for iOS

BSFacebookImagePicker is a drop-in replacement for UIImagePickerController that allows Users to choose photos from Facebook instead of the camera library.

BSFacebookImagePicker is lightweight and can be used with or without using the Facebook-iOS-SDK.

Choose photos you are tagged inChoose photos from your albums Choose photos from your friendsMove and Scale. Just Like Apple!

Features

  • Supports iOS 5 (slightly degraded experence) and iOS 6+ (best experence)
  • Authentication using iOS single signon (iOS 5+), or Fast App Switching to the Facebook App
  • Fallback Web-Based Authentication
  • Authentication can be bypassed if you allready have a Facebook Access token
  • Allows the user to choose photos from:
    • Their own albums and profile photos
    • Ones they have been tagged in
    • Thier friends albums and profile photos
    • Ones thier frineds have been tagged in
  • Uses an idential API to UIImagePickerController, so it can be used as a direct drop-in
  • BSFacebookImagePicker is currently localized to the following languages:
    • English
    • German
    • Spanish
    • French
    • Itallian
    • Japaneese
    • Korean
    • Russian
    • Chineese (simplified)
  • Skinable using UIAppearance

Requirements

FBAlbumPicker is build using Modern ARC based Objective-C AFNetworking is used for the networking Every attempt has been made to ensure compatibility with older versions of iOS

Usage

//Super easy
- (void) launchPicker {
  BSFacebookImagePickerController *picker = [[BSFacebookImagePickerController alloc] init];
  //Change to your facebook App ID and App Secret
  picker.facebookAppID = @"00000000";
  picker.facebookAppSecret = @"111111111";
  picker.delegate = self;
  [self.window.rootViewController presentViewController:picker animated:YES completion:nil];
}

//Note: BSFacebookImagePickerControllerDelegate uses the same method signatures of UIImagePickerController (drop in)
- (void)imagePickerController:(BSFacebookImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
  UIImage *image = info[@"UIImagePickerControllerEditedImage"];
  imageView.image = image;
  [self.window.rootViewController dismissViewControllerAnimated:YES completion:nil];
}

- (void)imagePickerControllerDidCancel:(BSFacebookImagePickerController *)picker {
  [self.window.rootViewController dismissViewControllerAnimated:YES completion:nil];
}

//Inside your Application Delegate for login support:
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
  [BSFacebookImagePickerController handleCallbackURL:url];
  return YES;
}

Warning

This software is not yet complete. There are a few loose ends that need to be finished before it is production ready. I am sharing it a bit early to give s few people a heads up on what I am working on.

  • Proper localilizations are not yet checked in. The files are stubbed out but they are still engilish. I would love some help here if you want to pitch in. Otherwise this is going to cost me a few hundred bucks.
  • The promised API to allow implementors to use existing Facebook tokens they have allready retrieved from the facebook-ios-sdk or other means has not yet been implemented
  • The library is still dependant on AFNetworking. I would like to break that dependancy in the spirit of lightweightedness.

Skinning

Look Ma, I'm Red!

//Skinning is super easy.  BSFacebookImagePicker uses stardard apple controls, so UIAppearance *just works*

- (void) launchPicker {
  [[UINavigationBar appearance] setTintColor:[UIColor redColor]];
  [[UIToolbar appearance] setTintColor:[UIColor redColor]];

  BSFacebookImagePickerController *picker = [[BSFacebookImagePickerController alloc] init];
  picker.delegate = self;
  [self.window.rootViewController presentViewController:picker animated:YES completion:nil];
}

Shout Outs

The following projects proved very usefull while developing this:

bsfacebookimagepicker's People

Contributors

bradtheappguy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.