Giter Site home page Giter Site logo

Comments (15)

efraespada avatar efraespada commented on July 18, 2024 2

Thanks for your work.
Your plugin should appear here. The official documentation suggests a plugin with deprecated components, and Apple doesn't accept it:

ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).

from twitter_login.

TheMedo avatar TheMedo commented on July 18, 2024 2

@0maru amazing job, keep up the good work, this repo is handy!

from twitter_login.

0maru avatar 0maru commented on July 18, 2024 1

@TheMedo
Added to README about intent filters.
Please let me know if there are any problems.

from twitter_login.

0maru avatar 0maru commented on July 18, 2024 1

@dungnc
Please try the following settings.

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <data android:scheme="https" android:host="***page.link" android:pathPattern="/jdF1">
</intent-filter>

from twitter_login.

0maru avatar 0maru commented on July 18, 2024

Hi efraespada,
This plugin does not use TwitterSDK.
You need to specify Callback URL you've added to the Twitter Developer.
Try to replace twittersdk with the Callback URL.

For Example

<intent-filter>
     <action android:name="android.intent.action.VIEW" />
     <category android:name="android.intent.category.DEFAULT" />
     <category android:name="android.intent.category.BROWSABLE" />
     <data android:scheme="f-twitter-oauth" android:host="" />
</intent-filter>

from twitter_login.

efraespada avatar efraespada commented on July 18, 2024

Same result with f-twitter-oauth. The login process is well but coming back to the app there is no change.

Could the main activity be loosing/stopping its thread execution when the login activity is opened?

D/FA      (14177): Application going to the background
V/FA      (14177): Inactivity, disconnecting from the service
I/flutter (14177): app in inactive

This line is never completed:

final AuthResult result = await twitterLogin.login();

from twitter_login.

0maru avatar 0maru commented on July 18, 2024

Did you add f-twitter-oauth:// to your Twitter APP Callback URLs?

Could the main activity be loosing/stopping its thread execution when the login activity is opened?

I don't think that's the case, but I'll take a look later.

from twitter_login.

efraespada avatar efraespada commented on July 18, 2024

Did you add f-twitter-oauth:// to your Twitter APP Callback URLs?

Yes, I did.

from twitter_login.

efraespada avatar efraespada commented on July 18, 2024

I tried to upgrade the Android source to the embedding v2 and everything works fine now.
Sorry for wasting your time.

from twitter_login.

0maru avatar 0maru commented on July 18, 2024

I'm sorry.
I'll add an explanation of the embedding v2 to README.md

from twitter_login.

TheMedo avatar TheMedo commented on July 18, 2024

I think adding the intent filters is important step for Android, maybe it should be included in the readme?

from twitter_login.

0maru avatar 0maru commented on July 18, 2024

@TheMedo
I think so too.

from twitter_login.

swagftw avatar swagftw commented on July 18, 2024

But app still freezes for me at
final result = await _twitterLogin.login();
Auth flow comes back the app after redirect but further code is not executed.
I have right config for
<meta-data android:name="flutterEmbedding" android:value="2"/>

from twitter_login.

dungnc avatar dungnc commented on July 18, 2024

@0maru

I added this callback URL (deep link) in the login function. I used this code and it didn't print anything, I think this function didn't return any information through deep link.

final twitterLogin = TwitterLogin(
      // Consumer API keys
      apiKey: '...',
      // Consumer API Secret keys
      apiSecretKey: '...',
      // Registered Callback URLs in TwitterApp
      // Android is a deeplink
      // iOS is a URLScheme
      redirectURI: 'https://....page.link/jdF1',
    );
    final authResult = await twitterLogin.login(forceLogin: true);
    print(authResult.user.email); // user email address
    print(authResult.user.thumbnailImage); // user setting picture
    print(authResult.user.name); // user name
    print(authResult.user.screenName); // twitter account id

    switch (authResult.status) {
      case TwitterLoginStatus.loggedIn:
        print("twitter success");
        print(authResult.user.screenName);
        // success
        break;
      case TwitterLoginStatus.cancelledByUser:
        print("twitter cancelled");
        // cancel
        break;
      case TwitterLoginStatus.error:
        print("twitter error");
        print(authResult.errorMessage);
        // error
        break;
    }

This is in AndroidManifest

<intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="https://....page.link/jdF1"/> 
            </intent-filter>

Opera Snapshot_2021-07-01_151714_developer twitter com

from twitter_login.

dungnc avatar dungnc commented on July 18, 2024

Great, I can get the information now. Thank you so much.

from twitter_login.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.