GithubHelp home page GithubHelp logo

zuckerkit's Introduction

#Zuckerkit

Zuckerkit is a wrapper around the Facebook SDK that makes common tasks easy. Things you can do:

Open session with basic info

- (void)openSessionWithBasicInfo:(void(^)( NSError *error))completionBlock;

Request publish permissions

- (void)requestPublishPermissions:(void(^)( NSError *error))completionBlock;

Get user info (name, email, id, etc)

- (void)getUserInfo:(void(^)(id<FBGraphUser> user, NSError *error))completionBlock;

Open session with basic info then request publish permissions

- (void)openSessionWithBasicInfoThenRequestPublishPermissions:(void(^)(NSError *error))completionBlock;

Get friends

- (void)getFriends:(void(^)(NSArray *friends, NSError *error))completionBlock;

Get app audience type (The visibility for the app, i.e Public, Friends, Only Me)

- (void)getAppAudienceType:(void(^)(FacebookAudienceType audienceType, NSError *error))completionBlock;

Invite friend to app via request dialogue (sends a request to a friend to join the current app)

- (void)showAppRequestDialogueWithMessage:(NSString*)message toUserId:(NSString*)userId;

#Usage

  1. Create a dictionary entry in your app plist called Zuckerkit with the following format:

    Zuckerkit: (Dictionary)

    • Production (Boolean)
    • Development Keys (Dictionary)
      • id (String)
      • name (String)
    • Production Keys (Dictionary)
      • id (String)
      • name (String)
  2. Also, as part of the normal FacebookSDK integration, register your Facebook App Id in your app's URL schemes:

    URL types: (Array)

    • Item 0 (Dictionary)
      • URL Schemes (Array)
        • Item 0 (String, set equal to your Facebook App Id)
  3. In your AppDelegate.m, implement the following methods (or add to them if they already exist):

    - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
       sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
    {	
        if([url.absoluteString rangeOfString:@"fb"].location != NSNotFound) {
            return [[Zuckerkit sharedInstance] handleOpenUrl:url];
        }
        return NO;
    }
    
    - (void)applicationDidBecomeActive:(UIApplication *)application
    {
        [[Zuckerkit sharedInstance] handleDidBecomeActive];
    }

#Contribution I've added methods to this kit as I've needed them, and haven't yet crossed path with all parts of the SDK. If you're familiar with various parts of the SDK and know of some methods that may be helpful, please feel free to contribute.

zuckerkit's People

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.