v1.1.0
flutter_twitter_login
一個 Flutter 插件,允許使用者使用原生 Android 與 iOS Twitter 登入 SDK 進行身分驗證。
35喜歡 26近 30 天下載40Pub 分數
平台暫無資料
一個用於透過 Android 與 iOS 上的原生 TwitterKit SDK 對使用者進行驗證的 Flutter 插件。
{"sdk":"flutter"}{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
pub package Build Status Coverage Status
A Flutter plugin for using the native TwitterKit SDKs on Android and iOS.
This plugin uses the new Gradle 4.1 and Android Studio 3.0 project setup.
See the installation instructions on pub. No platform-specific configuration is needed!
Here's some sample code that should cover most of the cases. For full API reference, just see the source code. Everything is documented there.
var twitterLogin = new TwitterLogin(
consumerKey: '<your consumer key>',
consumerSecret: '<your consumer secret>',
);
final TwitterLoginResult result = await twitterLogin.authorize();
switch (result.status) {
case TwitterLoginStatus.loggedIn:
var session = result.session;
_sendTokenAndSecretToServer(session.token, session.secret);
break;
case TwitterLoginStatus.cancelledByUser:
_showCancelMessage();
break;
case TwitterLoginStatus.error:
_showErrorMessage(result.error);
break;
}