[SOLVED] No implementation found for method login on channel app.meedu/flutter_facebook_auth


This Content is from Stack Overflow. Question asked by Sarmed MQ Berwari

I am trying to use facebook auth in myy app with flutter.

I did all things in documentation.

also I tried to find solution here but nothing helped me ,for example this post and this post

I add this strings.xml :

<?xml version="1.0" encoding="utf-8"?>
    <string name="facebook_app_id">xxxxxxxxxxx</string>
    <string name="fb_login_protocol_scheme">fbxxxxxxxxxxxx</string>
    <string name="facebook_client_token">xxxxxxxxxxxxxxxxx</string>
    <string name="app_name">xxxx</string>

in AndroidManifest.xml I add this :

<uses-permission android:name="android.permission.INTERNET"/> // before application

<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/>

<activity android:name="com.facebook.FacebookActivity"
            android:label="@string/app_name" />
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="@string/fb_login_protocol_scheme" />
        <provider android:authorities="com.facebook.katana.provider.PlatformProvider" />

my function :

final LoginResult result = await FacebookAuth.instance.login();
      if (result.status == LoginStatus.success) {
        accessToken = result.accessToken!;
        isLogined = true;
        final userData = await FacebookAuth.instance.getUserData();   
      } else {

I get this error [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: MissingPluginException(No implementation found for method login on channel app.meedu/flutter_facebook_auth)


Usually the “No implementation” error is caused when you add a new package and do hot reload, or when the platform isn’t supported. Try running the app from cold start. If it still fails, I recommend using¬†firebase_auth¬†package for authentication since it supports multiple providers including Facebook.

Answered by mutasimdarras

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 4.0.

people found this article helpful. What about you?