facebook / facebook-ios-sdk

Used to integrate the Facebook Platform with your iOS & tvOS apps.
https://developers.facebook.com/docs/ios
Other
7.8k stars 3.56k forks source link

Facebook business login in flutter #2459

Open DEVELOPBYSHUBH opened 3 months ago

DEVELOPBYSHUBH commented 3 months ago

Checklist before submitting a bug report

Xcode version

15

Facebook iOS SDK version

17

Dependency Manager

CocoaPods

SDK Framework

Login

Goals

I want to log in to my Flutter app through Facebook Business Login and also i want to take page access for that.

Expected results

After login it should give user data in login result but it does not giving any data .

Actual results

I am getting that its look like app isn't available
Simulator Screenshot - iPhone 15 - 2024-07-26 at 18 28 07

Steps to reproduce

After login in code no response is coming same error always came

Code samples & details

final LoginResult loginResult = await FacebookAuth.instance.login(
      permissions: [
        'public_profile',
        'email',
      ],
    );

for page access 
 final LoginResult loginResult =
          await FacebookAuth.instance.login(permissions: [
        SocialMediaConstants.permissionPagesShowList,
        SocialMediaConstants.permissionManageMetadata,
        SocialMediaConstants.permissionManagePosts,
        SocialMediaConstants.permissionManageReadEngagement,
        SocialMediaConstants.permissionPageMessaging,
        SocialMediaConstants.permissionPageManageAds,
        SocialMediaConstants.permissionBusinessManagement
      ]);
      print("loginResult  ,  ${loginResult.message}");

this is my social media constant 

class SocialMediaConstants {
  const SocialMediaConstants._();

  // Facebook API query parameter constants
  static const String message = 'message';
  static const String accessToken = 'access_token';

  static const String permissionPagesShowList = 'pages_show_list';
  static const String permissionManageMetadata = 'pages_manage_metadata';
  static const String permissionManagePosts = 'pages_manage_posts';
  static const String permissionManageReadEngagement = 'pages_read_engagement';
  static const String permissionPageMessaging = 'pages_messaging';
  static const String permissionPageManageAds = 'pages_manage_ads';

  static const String permissionBusinessManagement = 'business_management';
  static const String permissionInstagramBasic = 'instagram_basic';
  static const String permissionInstagramContentPublish =
      'instagram_content_publish';
DEVELOPBYSHUBH commented 3 months ago

Both methods are not working. How can I solve this issue also i am using my developer account or admin account for login in development mode, but I am still getting the same error.