Latest 0.9.0
Homepage https://github.com/bhavuk11/MobikulFBSignI
License MIT
Platforms ios 9.0
Dependencies FBSDKCoreKit, FBSDKShareKit, FBSDKLoginKit
Authors

CI Status
Version
License
Platform

MobikulFBSignI is a simple library to implement facebook login in your application for saving your time, and efforts to write the code of Facebook login and also if you remove this library from your project then no need to change the code it doesn’t effect your applicationand also you don’t need to define or add facebook dependencies MobikulFBSignI automatically manages.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 9+

Installation

MobikulFBSignI is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'MobikulFBSignI'

Usage

On click event of facebook button

if let myclass = stringClassFromString("MobikulFBSignIn") as? NSObject.Type {
    _ = myclass.init()
    NotificationCenter.default.addObserver(self, selector: #selector(SignInDataViewController.responseFromSocialLogin), name: NSNotification.Name(rawValue: "MobikulFBSignIn"), object: nil)
}

func stringClassFromString(_ className: String) -> AnyClass? {
    var namespace = Bundle.main.infoDictionary!["CFBundleExecutable"] as! String;
    namespace = "MobikulFBSignI".replacingOccurrences(of: " ", with: "_")
    return NSClassFromString("(namespace).(className)");
}

Get Response after sign with facebook done

@objc func responseFromSocialLogin(data: Any) {
    if let x = data as? NSNotification , let fbData = x.userInfo as? [String: Any] {
        print(fbData["email"] as? String)
        print(fbData["first_name"] as? String)
        print(fbData["last_name"] as? String)
    }
}

Author

bhavuk11, [email protected]

License

MobikulFBSignI is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "MobikulFBSignI",
    "version": "0.9.0",
    "summary": "A short description of MobikulFBSignI.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/bhavuk11/MobikulFBSignI",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "bhavuk11": "[email protected]"
    },
    "source": {
        "git": "https://github.com/bhavuk11/MobikulFBSignI.git",
        "tag": "0.9.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "*",
    "resource_bundles": {
        "MobikulFBSignI": [
            "*.{xib,xcassets}"
        ]
    },
    "dependencies": {
        "FBSDKCoreKit": [],
        "FBSDKShareKit": [],
        "FBSDKLoginKit": []
    }
}

Pin It on Pinterest

Share This