Skip to content

Instantly share code, notes, and snippets.

@johnny77221
Created February 19, 2016 07:46
Show Gist options
  • Select an option

  • Save johnny77221/7099756cedb18ff0f3bc to your computer and use it in GitHub Desktop.

Select an option

Save johnny77221/7099756cedb18ff0f3bc to your computer and use it in GitHub Desktop.

Revisions

  1. johnny77221 created this gist Feb 19, 2016.
    17 changes: 17 additions & 0 deletions JHFacebookLogin.h
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    //
    // JHFacebookLogin.h
    //
    // Created by John Hsu on 2016/2/19.
    //

    #import <Foundation/Foundation.h>
    #import <Accounts/Accounts.h>
    #import <Social/Social.h>

    @interface JHFacebookLogin : NSObject
    +(void)loginFacebook:(void(^)(NSDictionary *meObject, NSError *err))handler;

    @property (nonatomic, strong) ACAccountStore *accountStore;
    @property (nonatomic, strong) ACAccount *facebookAccount;
    @property (nonatomic, copy) void(^handler)(NSDictionary *meObject,NSError *err);
    @end