पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv4.4.2

twitter_login

Flutter Twitter लॉगिन प्लगइन। Twitter APIs OAuth सेवा के साथ लॉगिन करने के लिए लाइब्रेरी

AndroidiOSmacOS
30-दिन डाउनलोड
7.6 हज़ार
लाइक
117
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add twitter_login

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

एक फ्लटर प्लगइन जो OAuth का उपयोग करके ट्विटर लॉगिन की अनुमति देता है, जिससे उपयोगकर्ता ट्विटर के API के माध्यम से प्रमाणीकरण कर सकते हैं। यह एंड्रॉइड, आईओएस और मैकओएस प्लेटफॉर्म पर ट्विटर के प्रमाणीकरण सेवा के साथ एकीकरण को सरल बनाता है। प्लगइन सुरक्षित रूप से OAuth फ़्लो का प्रबंधन करता है, जिससे अनुमति प्राप्त ऐप इंटरैक्शन के लिए एक्सेस टोकन प्रदान किए जाते हैं। ट्विटर के रूप में पहचान प्रदाता के साथ सोशल लॉगिन कार्यक्षमता की आवश्यकता वाले ऐप्स के लिए आदर्श है। बिना किसी बाधा के उपयोगकर्ता ओनबोर्डिंग और सुरक्षित ऑथेंटिकेशन विवरण प्रबंधन को समर्थित करता है।

उपयोग

  • Twitter के साथ सोशल लॉगिन
  • Twitter के माध्यम से उपयोगकर्ता प्रमाणीकरण
  • सोशल खातों के साथ ऐप ऑनबोर्डिंग
  • सुरक्षित OAuth टोकन प्रबंधन
  • क्रॉस-प्लेटफ़ॉर्म ट्विटर लॉगिन

मुख्य विशेषताएँ

  • OAuth 1.0a समर्थन
  • Android/iOS/macOS सामंजस्यता
  • सुरक्षित τोकन प्रबंधन
  • सरल API एकीकरण
  • एम्बेडेड त्रुटि संभाल

इनके लिए उपयुक्त

  • Twitter लॉगिन की आवश्यकता वाले ऐप्स
  • सोशल फीचर्स बनाने वाले डेवलपर्स
  • क्रॉस-प्लेटफॉर्म मोबाइल ऐप्स
  • प्रमाणीकरण-केंद्रित एप्लिकेशन
  • OAuth-आधारित पहचान प्रदाता का उपयोग करने वाले प्रोजेक्ट

विचार योग्य बातें

  • Twitter डेवलपर खाता की आवश्यकता है
  • Twitter Developer Portal में सही एप्लिकेशन कॉन्फ़िगरेशन की आवश्यकता होती है
  • OAuth 1.0a (OAuth 2.0 नहीं) पर सीमित
  • Twitter API की उपलब्धता पर निर्भर करता है
  • अतिरिक्त गोपनीयता नीति घोषणाओं की आवश्यकता हो सकती है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

twitter_login

Pub Version

Flutter Twitter Login Plugin

Requirements

  • Dart sdk: ">=2.12.0-0 <3.0.0"
  • flutter: ">=1.25.0-8.1.pre"
  • Android: minSdkVersion 17 and add support for androidx
  • iOS: --ios-language swift, Xcode version >= 11

Twitter Configuration

Twitter Developer

required to create TwitterApp.
this plugin is need Callback URLs.

please register a different callback URL on Twitter Developers.

app_name://

If the API is not set to get email, email may be null. If you want to use email, turn on Request email address from users.

Android Configuration

Add intent filters for incoming links

/example/android/app/src/main/AndroidManifest.xm

You need to replace the scheme with a Callback URLs.

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <!-- Accepts URIs that begin with "example://gizmos” -->
  <!-- Registered Callback URLs in TwitterApp -->
  <data android:scheme="example"
        android:host="gizmos" /> <!-- host is option -->
</intent-filter>
Supporting the new Android plugins APIs

If you flutter created your project prior to version 1.12, you need to make sure to update your project in order to use the new Java Embedding API.
Make use you have flutter_embedding v2 enabled. Add the following code on the manifest file inside tag to enable embedding.
Flutter wiki: Upgrading pre 1.12 Android projects.

<meta-data
    android:name="flutterEmbedding"
    android:value="2" />

iOS Configuration

Add URLScheme

/example/ios/Runner/Info.plist

You need to replace the example with a Callback URLs.

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLName</key>
    <string></string>
    <key>CFBundleURLSchemes</key>
    <array>
      <!-- Registered Callback URLs in TwitterApp -->
      <string>example</string>
    </array>
  </dict>
</array>

Example code

See the example directory for a complete sample app using twitter_login.

example

Usage

To use this plugin, add twitter_login as a dependency in your pubspec.yaml file.

Example
import 'package:flutter/material.dart';
import 'package:twitter_login/twitter_login.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Twitter Login App'),
        ),
        body: Center(
          child: FlatButton(
            child: Text('Login With Twitter'),
            onPressed: () async {
              final twitterLogin = TwitterLogin(
                // Consumer API keys
                apiKey: 'xxxx',
                // Consumer API Secret keys
                apiSecretKey: 'xxxx',
                // Registered Callback URLs in TwitterApp
                // Android is a deeplink
                // iOS is a URLScheme
                redirectURI: 'example://',
              );
              final authResult = twitterLogin.login();
              switch (authResult.status) {
                case TwitterLoginStatus.loggedIn:
                  // success
                  break;
                case TwitterLoginStatus.cancelledByUser:
                  // cancel
                  break;
                case TwitterLoginStatus.error:
                  // error
                  break;
              }
            },
          ),
        ),
      ),
    );
  }
}

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 2 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट