Latest 0.0.1
Homepage https://github.com/duanruiying/DryFacebook
License MIT
Platforms ios 10.0, requires ARC
Dependencies FBSDKLoginKit
Frameworks UIKit, Foundation
Authors

iOS: Facebbok功能集成简化(登录)

Prerequisites

  • Xcode 10.2.1
  • iOS 10.0 or later
  • ObjC、Swift

Installation

  • pod ‘DryFacebook’

App工程配置

  • 为URL Types 添加回调scheme(identifier:""、URL Schemes:"fb+AppID")
  • info.plist文件属性LSApplicationQueriesSchemes中增加fbapi、fb-messenger-share-api、fbauth2、fbshareextension字段
  • info.plist文件新增两个属性:
    <key>FacebookAppID</key>
    <string>应用程序在fb的appid</string>
    <key>FacebookDisplayName</key>
    <string>应用程序名称</string>

Features

SDK配置

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [DryFacebook registerSDK:application launchOptions:launchOptions];
    return YES;
}

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
    [DryFacebook handleOpenURL:url application:app options:options];
    return YES;
}

授权、获取用户信息

[DryFacebook login:^(DryFacebookUser * _Nullable user, DryFacebookCode code) {

}];

Latest podspec

{
    "name": "DryFacebook",
    "version": "0.0.1",
    "summary": "DryFacebook",
    "homepage": "https://github.com/duanruiying/DryFacebook",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "duanruiying": "[email protected]"
    },
    "source": {
        "git": "https://github.com/duanruiying/DryFacebook.git",
        "tag": "0.0.1"
    },
    "description": "TODO: Facebboku529fu80fdu7b80u5316(u767bu5f55).",
    "swift_versions": "5",
    "platforms": {
        "ios": "10.0"
    },
    "requires_arc": true,
    "user_target_xcconfig": {
        "OTHER_LDFLAGS": [
            "-w"
        ]
    },
    "static_framework": true,
    "pod_target_xcconfig": {
        "OTHER_LDFLAGS": [
            "-w",
            "-ObjC"
        ]
    },
    "source_files": "DryFacebook/Classes/Code/**/*",
    "public_header_files": "DryFacebook/Classes/Code/Public/**/*.h",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "dependencies": {
        "FBSDKLoginKit": []
    },
    "swift_version": "5"
}

Pin It on Pinterest

Share This