MjFbLogin
Simple and light weight facebook login library which provides support for UIKit & SwiftUI
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
How to use
- Step-1 Install Pod: Add pod ‘MjFbLogin’ in your pod file and install pod.
pod 'MjFbLogin'
- Step-2 Import Library: Add an extension (FbLoginStatus) in your View or ViewController & add its required methods, now create an instance of FacebookLoginController() class and call beginFbLogin() method on your button click event.
- Step-3 Configure Info.plist: In Xcode right-click on Info.plist, and choose Open As Source Code. Copy and paste the following XML snippet into the body of your file (…), replacing [APP_ID] with Facebook application id, [CLIENT_TOKEN] value found under Settings > Advanced > Client Token in your App Dashboard and [APP_NAME] with Facebook application name
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb[APP_ID]</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>[APP_ID]</string>
<key>FacebookClientToken</key>
<string>[CLIENT_TOKEN]</string>
<key>FacebookDisplayName</key>
<string>[APP_NAME]</string>
<key>FacebookAutoLogAppEventsEnabled</key>
<true/>
<key>FacebookAdvertiserIDCollectionEnabled</key>
<true/>
Requirements
- iOS 9+
- Xcode 11+
Installation
MjFbLogin is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'MjFbLogin'
Author
Mohammad Jeeshan
mohammad.jeeshan.91@gmail.com
License
MjFbLogin is available under the MIT license. See the LICENSE file for more info.
Social Media
Please follow me on social media