SimpleTwitterAuthentication 2.0.3

SimpleTwitterAuthentication 2.0.3

Nobuhiro Ito 维护。



  • 作者
  • Nobuhiro Ito

SimpleTwitterAuthentication

SimpleTwitterAuthentication 是 Twitter 登录用 Authentication 的简单封装。

  • 如果安装了 Twitter app,则使用 Twitter app SSO(如 TwitterKit)
  • 如果没有安装 Twitter app,则使用应用内部浏览器进行认证。
    • iOS 12+:ASWebAuthenticationSession
    • iOS 11:SFAuthenticationSession
    • iOS 10:SFSafariViewController

如何使用

  1. 完成 Twitter 的注册并获得消费者密钥和机密密钥。 您还需要在 Twitter 开发者控制台中为您的应用添加回调 URL 方案。
  2. 将 SimpleTwitterAuthentication 安装到您的项目中。
  3. 将回调 URL 方案添加到 Info.plist 的 URL Types 中
  4. 实现调用 TwitterAuthentication.authenticate(completionHandler:) 来认证 Twitter,您需要存储实例以供 AppDelegate 访问。
  5. 在 AppDelegate 中实现对 application(_:open:options:)TwitterAuthentication.handleOpen(_:options:) 调用

更多详细信息,请参阅示例。

作者

Nobuhiro Ito [email protected]
PIRIKA Inc. / PIRIKA Association

许可

Apache License, Version 2.0

Copyright (C) 2019 PIRIKA Association
Copyright (C) 2019 PIRIKA Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://apache.ac.cn/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.