GithubHelp home page GithubHelp logo

mobikulfbsigni's Introduction

MobikulFBSignI

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.

mobikulfbsigni's People

Contributors

bhavuk-webkul avatar

Stargazers

Jitendra Kumar Kesharwani avatar  avatar Aman-Gupta-Webkul avatar  avatar Vedesh Kumar avatar Anchit Makkar avatar  avatar Ratnesh Kumar avatar  avatar

Watchers

James Cloos avatar Aman-Gupta-Webkul avatar  avatar

mobikulfbsigni's Issues

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.