Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accesstoken is generated by android is working but when generated by the ios is giving error (Authentication error: AxiosError: Request failed with status code 400) #411

Open
PSBARTERGRAM opened this issue Jun 6, 2024 · 4 comments

Comments

@PSBARTERGRAM
Copy link

What version are you using?

6.2.0

What OS and version are you using to local deploy your application?

Version 15.3

What platforms are you seeing the problem on?

iOS

pubspec.yaml

name: bartergram_frontend
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1

environment:
  sdk: '>=3.2.4 <4.0.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  get_it: ^7.6.4
  injectable: ^2.3.0
  dartz: ^0.10.1
  equatable: ^2.0.5
  http: ^1.1.0
  double_back_to_close_app: ^2.1.0
  flutter_bloc: ^8.1.3
  bloc: ^8.1.3
  flutter_svg: ^2.0.10+1
  go_router: ^13.2.0
  provider: ^6.1.1
  flutter_launcher_icons: ^0.13.1
  google_fonts: ^6.2.1
  video_player: ^2.8.3
  dots_indicator: ^3.0.0
  carousel_slider: ^4.2.1
  image_picker: ^1.0.7
  dotted_border: ^2.0.0
  file_picker: ^8.0.3
  back_button_interceptor: ^7.0.2
  syncfusion_flutter_charts: ^25.1.37
  flutter_facebook_auth: ^6.2.0
  hive_flutter: ^1.1.0
  platform: ^3.1.4
  form_inputs:
    path: packages/form_inputs
  formz: ^0.6.1
  razorpay_flutter: ^1.3.7
  firebase_auth: ^5.0.0




dev_dependencies:
  flutter_test:
    sdk: flutter

  # The "flutter_lints" package below contains a set of recommended lints to
  # encourage good coding practices. The lint set provided by the package is
  # activated in the `analysis_options.yaml` file located at the root of your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^2.0.0
  injectable_generator: ^2.4.0
  build_runner: ^2.4.8
  flutter_launcher_icons: "^0.13.1"

flutter_launcher_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon/icon.png"
  min_sdk_android: 21

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/svg/
    - assets/png/
    - assets/png/home/
    - assets/png/profile_page/hamburger.png
    - assets/png/authentication/instagram_icon.png
    - assets/svg/profile/
    - assets/svg/authentication/
    - assets/svg/notification/
    - assets/svg/phone_book/
    - assets/png/authentication/
    - assets/png/bottom_nav_bar/
    - assets/png/phone_book/
    - assets/png/home/
    - assets/png/profile_page/
    - assets/svg/reel/
    - assets/svg/deals/
    - config/
    - assets/png/deals/
    - assets/png/deals_brand/
    - assets/png/subscription_brand/
    - assets/svg/message/
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

Describe the Bug

Accesstoken is generated by android is working but when generated by the ios is giving error
params: {
fields: 'email,name,accounts{picture,access_token,category,name,id},id',
access_token: 'ChdgKov8IRtiAuPtQCOAivIUW9WlbuTSQgBJYwruWylZ9yqIL3akyT2s7oFzUcBqNocwHtO09qBbZ7H5qdPvdlWMWoZgFPbGnokJBdL0epce7iIfRN6zMeAg6kxXmSiZW1R1TKt9YTIxYtQf7Qm9o7vipDVor9UDgIFEezqH2bAue7iXOHlexXQDuMJGgU4aIJa2YkcROTqtSRGW0uMHIQDHyMDBEPxKOqLUEsziVEK5RIG61CeFV1GlXPwdca1'
},
method: 'get',
url: 'https://graph.facebook.com/v19.0/me',
data: undefined

Expected Behavior

give response

To Reproduce

code is workin on the android but perfectly
onPressed: () async {
FacebookAuth.instance.logOut();
try {
final AccessToken? accessToken =
await FacebookAuth.instance.accessToken;
if (accessToken != null) {
debugPrint(
'Existing Access Token: ${accessToken.token}');
await FacebookAuth.instance.logOut();
debugPrint('Logged out of existing session');
}

                      final LoginResult result =
                          await FacebookAuth.instance.login(
                        permissions: [
                          'email',
                          'read_insights',
                          'pages_show_list',
                          'business_management',
                          'instagram_basic',
                          'instagram_manage_insights',
                          'pages_read_engagement',
                          'pages_read_user_content',
                        ],
                      );

                      if (result.status == LoginStatus.success) {
                        final AccessToken newAccessToken =
                            result.accessToken!;
                        debugPrint(
                            'New Access Token: ${newAccessToken.token}');

                        final userData =
                            await FacebookAuth.instance.getUserData();
                        debugPrint('User Data: $userData');

                        if (userData != null) {
                          context.pushNamed(
                              RouteStrings.getPagesFromFacebookScreen);
                          await context.read<GetFbPagesCubit>().getFbPages(
                                accessToken: newAccessToken.token,
                                userType: 'BRAND',
                              );
                        }
                      } else {
                        debugPrint('Login Failed: ${result.message}');
                      }
                    } catch (e) {
                      debugPrint('Error: $e');
                    }
                  },

Relevant log output

POST /auth/facebook-callback? 500 457.836 ms - 47
Authentication error: AxiosError: Request failed with status code 400
    at settle (/Users/apple/projects/bartergram_backend/node_modules/axios/dist/node/axios.cjs:1966:12)
    at IncomingMessage.handleStreamEnd (/Users/apple/projects/bartergram_backend/node_modules/axios/dist/node/axios.cjs:3065:11)
    at IncomingMessage.emit (node:events:531:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
    at Axios.request (/Users/apple/projects/bartergram_backend/node_modules/axios/dist/node/axios.cjs:3876:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/apple/projects/bartergram_backend/routes/auth.js:311:30 {
  code: 'ERR_BAD_REQUEST',
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [ 'xhr', 'http' ],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    env: { FormData: [Function], Blob: [class Blob] },
    validateStatus: [Function: validateStatus],
    headers: Object [AxiosHeaders] {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': undefined,
      'User-Agent': 'axios/1.6.8',
      'Accept-Encoding': 'gzip, compress, deflate, br'
    },
    params: {
      fields: 'email,name,accounts{picture,access_token,category,name,id},id',
      access_token: 'ChdgKov8IRtiAuPtQCOAivIUW9WlbuTSQgBJYwruWylZ9yqIL3akyT2s7oFzUcBqNocwHtO09qBbZ7H5qdPvdlWMWoZgFPbGnokJBdL0epce7iIfRN6zMeAg6kxXmSiZW1R1TKt9YTIxYtQf7Qm9o7vipDVor9UDgIFEezqH2bAue7iXOHlexXQDuMJGgU4aIJa2YkcROTqtSRGW0uMHIQDHyMDBEPxKOqLUEsziVEK5RIG61CeFV1GlXPwdca1'
    },
    method: 'get',
    url: 'https://graph.facebook.com/v19.0/me',
    data: undefined
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      socket: [Function (anonymous)],
      timeout: [Function (anonymous)],
      finish: [Function: requestOnFinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: true,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: true,
    maxRequestsOnConnectionReached: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    strictContentLength: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    _closed: true,
    _header: 'GET /v19.0/me?fields=email,name,accounts%7Bpicture,access_token,category,name,id%7D,id&access_token=ChdgKov8IRtiAuPtQCOAivIUW9WlbuTSQgBJYwruWylZ9yqIL3akyT2s7oFzUcBqNocwHtO09qBbZ7H5qdPvdlWMWoZgFPbGnokJBdL0epce7iIfRN6zMeAg6kxXmSiZW1R1TKt9YTIxYtQf7Qm9o7vipDVor9UDgIFEezqH2bAue7iXOHlexXQDuMJGgU4aIJa2YkcROTqtSRGW0uMHIQDHyMDBEPxKOqLUEsziVEK5RIG61CeFV1GlXPwdca1 HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'User-Agent: axios/1.6.8\r\n' +
      'Accept-Encoding: gzip, compress, deflate, br\r\n' +
      'Host: graph.facebook.com\r\n' +
      'Connection: keep-alive\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: nop],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object: null prototype],
      requests: [Object: null prototype] {},
      sockets: [Object: null prototype] {},
      freeSockets: [Object: null prototype],
      keepAliveMsecs: 1000,
      keepAlive: true,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 1,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(shapeMode)]: false,
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'GET',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    joinDuplicateHeaders: undefined,
    path: '/v19.0/me?fields=email,name,accounts%7Bpicture,access_token,category,name,id%7D,id&access_token=ChdgKov8IRtiAuPtQCOAivIUW9WlbuTSQgBJYwruWylZ9yqIL3akyT2s7oFzUcBqNocwHtO09qBbZ7H5qdPvdlWMWoZgFPbGnokJBdL0epce7iIfRN6zMeAg6kxXmSiZW1R1TKt9YTIxYtQf7Qm9o7vipDVor9UDgIFEezqH2bAue7iXOHlexXQDuMJGgU4aIJa2YkcROTqtSRGW0uMHIQDHyMDBEPxKOqLUEsziVEK5RIG61CeFV1GlXPwdca1',
    _ended: true,
    res: IncomingMessage {
      _events: [Object],
      _readableState: [ReadableState],
      _maxListeners: undefined,
      socket: null,
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      rawHeaders: [Array],
      rawTrailers: [],
      joinDuplicateHeaders: undefined,
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 400,
      statusMessage: 'Bad Request',
      client: [TLSSocket],
      _consuming: true,
      _dumped: false,
      req: [Circular *1],
      _eventsCount: 4,
      responseUrl: 'https://graph.facebook.com/v19.0/me?fields=email,name,accounts%7Bpicture,access_token,category,name,id%7D,id&access_token=ChdgKov8IRtiAuPtQCOAivIUW9WlbuTSQgBJYwruWylZ9yqIL3akyT2s7oFzUcBqNocwHtO09qBbZ7H5qdPvdlWMWoZgFPbGnokJBdL0epce7iIfRN6zMeAg6kxXmSiZW1R1TKt9YTIxYtQf7Qm9o7vipDVor9UDgIFEezqH2bAue7iXOHlexXQDuMJGgU4aIJa2YkcROTqtSRGW0uMHIQDHyMDBEPxKOqLUEsziVEK5RIG61CeFV1GlXPwdca1',
      redirects: [],
      [Symbol(shapeMode)]: true,
      [Symbol(kCapture)]: false,
      [Symbol(kHeaders)]: [Object],
      [Symbol(kHeadersCount)]: 36,
      [Symbol(kTrailers)]: null,
      [Symbol(kTrailersCount)]: 0
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'graph.facebook.com',
    protocol: 'https:',
    _redirectable: Writable {
      _events: [Object],
      _writableState: [WritableState],
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 0,
      _requestBodyBuffers: [],
      _eventsCount: 3,
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'https://graph.facebook.com/v19.0/me?fields=email,name,accounts%7Bpicture,access_token,category,name,id%7D,id&access_token=ChdgKov8IRtiAuPtQCOAivIUW9WlbuTSQgBJYwruWylZ9yqIL3akyT2s7oFzUcBqNocwHtO09qBbZ7H5qdPvdlWMWoZgFPbGnokJBdL0epce7iIfRN6zMeAg6kxXmSiZW1R1TKt9YTIxYtQf7Qm9o7vipDVor9UDgIFEezqH2bAue7iXOHlexXQDuMJGgU4aIJa2YkcROTqtSRGW0uMHIQDHyMDBEPxKOqLUEsziVEK5RIG61CeFV1GlXPwdca1',
      [Symbol(shapeMode)]: true,
      [Symbol(kCapture)]: false
    },
    [Symbol(shapeMode)]: false,
    [Symbol(kCapture)]: false,
    [Symbol(kBytesWritten)]: 0,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kChunkedBuffer)]: [],
    [Symbol(kChunkedLength)]: 0,
    [Symbol(kSocket)]: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'graph.facebook.com',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 9,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'graph.facebook.com',
      _closeAfterHandlingError: false,
      _readableState: [ReadableState],
      _writableState: [WritableState],
      allowHalfOpen: false,
      _maxListeners: undefined,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      timeout: 5000,
      parser: null,
      _httpMessage: null,
      [Symbol(alpncallback)]: null,
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: -1,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: Timeout {
        _idleTimeout: 5000,
        _idlePrev: [TimersList],
        _idleNext: [TimersList],
        _idleStart: 2719016,
        _onTimeout: [Function: bound ],
        _timerArgs: undefined,
        _repeat: null,
        _destroyed: false,
        [Symbol(refed)]: false,
        [Symbol(kHasPrimitive)]: false,
        [Symbol(asyncId)]: 3096,
        [Symbol(triggerId)]: 3094
      },
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(shapeMode)]: true,
      [Symbol(kCapture)]: false,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(kSetKeepAlive)]: true,
      [Symbol(kSetKeepAliveInitialDelay)]: 1,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object]
    },
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'user-agent': [Array],
      'accept-encoding': [Array],
      host: [Array]
    },
    [Symbol(errored)]: null,
    [Symbol(kHighWaterMark)]: 16384,
    [Symbol(kRejectNonStandardBodyWrites)]: false,
    [Symbol(kUniqueHeaders)]: null
  },
  response: {
    status: 400,
    statusText: 'Bad Request',
    headers: Object [AxiosHeaders] {
      vary: 'Origin',
      'access-control-allow-origin': '*',
      'content-type': 'application/json',
      'www-authenticate': 'OAuth "Facebook Platform" "invalid_token" "Malformed access token"',
      'strict-transport-security': 'max-age=15552000; preload',
      pragma: 'no-cache',
      'cache-control': 'no-store',
      expires: 'Sat, 01 Jan 2000 00:00:00 GMT',
      'x-fb-request-id': 'AAIS_QytHvJtumO8hcr66gv',
      'x-fb-trace-id': 'AhONxQkQbYu',
      'x-fb-rev': '1014019654',
      'x-fb-debug': 'tqQVkN7VlxCqk1iHWet2zggSPxnYOncR8nRiI4Pn2QfQWgdTFSMsV1Q15I6n/sFa8sPar+XIJKGQXPdTTdZOWg==',
      date: 'Thu, 06 Jun 2024 10:31:07 GMT',
      'proxy-status': 'http_request_error; e_proxy="AcKCGLEXRTRV-p43fLa-m38pkh4p1PWIyY0pGNKwWxMlgL-8pvSyX89B0hEcGOqqj-4F10JSr9bXnFszJgcB"; e_fb_binaryversion="AcJd-IuYQbtRroCg5hb_koJx6kY-wCv1Bd-RM4Q0sT735kjH_43bsBtzhWsAWEUaWfDHpDJTeufE_z7dodj3wSaRj0_5Dh7pKmM"; e_fb_httpversion="AcKVf4FViq4-Nf5Rm2uiaX-0Q5PO49t1rju5Za1mspp19feNk2JAP9OpV4hP"; e_fb_responsebytes="AcLrhRc1sW_pf7L6LnoE8joIX4u4vfz1dHwYGD873S44ZEjS16wPyKEmCq9s"; e_fb_requesttime="AcI3tjIzNc-6PFVzQAisVY9afnlHzOym8Eufwr1Dpa_un5WClqB2Tv0RCQhPTtJxnP9SWFCaRQ"; e_fb_requesthandler="AcJrWjFH07lkGgYmIIgi7nclve_fvT0cPqhc1s8b6szd-6spi2nm7Q3ZP8nAAvu0_ilIeE9cBiw"; e_fb_hostheader="AcLyHNU8nVfkCpquneNiP6M30CasHyp4LVIOQblvGrE7YI_syAmA0OU3Ie-pHilgtxsgAR8DQsuCZee7"; e_fb_requestsequencenumber="AcLmBhzEXVte-Z2chhrdd8qtVaZOdLownC9HtDesYV6_ERNq8F0yue5tAJAm"; e_upip="AcK5a1b2GrDmg01MvDa79a9ifDH-mmkVE0KSlxJgiRfTCGYtVddatOam8o3kJECzEtKFuvkMtLDH8U6MyuJSJeCqAIDOaXE2MA"; e_fb_builduser="AcJ6fOJmsNYQl_dVPT6NYqpACj4oOuYdMRD5WKZkC-SiXFDDzGBuVWK6PtLYzXw2NFY"; e_fb_vipport="AcIS4dtd7WG6U2fgEtomjTFO7resp6Rz6p11mZYx4p_BdK_v2UkV-PePmMCI"; e_clientaddr="AcLDUXzbPXflJKTvFx6itQHnMpxtHqWeryJz5SHdymfBvy6LkipQRqmqSM6_BUad1hYLV88E87RUwB7mmplPmrRP4C5ZLpOcNaXJ8MBVcPOAJZsm8g"; e_fb_vipaddr="AcKftrdoUQmP9-Ju-CrdmMA2rSrrdLfjVicNgTpahibaB9ipU8xDJAu0w0sIpj8M96sqbHqAOb38Fqpoms2DmHBmoKl8UvGyKw"; e_fb_configversion="AcLiwIbuXrwskGPL7R7tKbtSIhJi3nYX23Sjv8hbi9Mcm6Scl1VNHIfRecUs3A", http_request_error; e_proxy="AcJW-RMOFQflKdPLqJK_29xfa1kWhWUH5VGhyxGJvGZA0RTuPGztjTgrup2pGWhwUFsx7KonlPWiljs"; e_fb_binaryversion="AcILYcx2IlznqCc85MYW0igzchK6fTRiRAe9SOHxaHBPKSoPrlufRRO5YJ46qOChde9m1unDUNX7agf2ZnN2SBNqUBPyjBXtzMk"; e_fb_httpversion="AcIAe2ugMdMsW6HgVhsflQ8b7g7AbRvhqz9zqW4rzNnqaYWRLtoCF7zQafPl"; e_fb_responsebytes="AcKcRuBqGzMZtlmyr4U3cW34zqzwaO1Y1CPMvOdGnw8vXiGFm_zMBk7MYhDa"; e_fb_requesttime="AcLiRnYniC5CRRZZytZBo23Bi16XYvWqKYTp6VeTu7P2UGe1l5zwm7yO-f59fkzLiZY1Kez9XA"; e_fb_requesthandler="AcLM4leIneKgLuRp5kfksUgax2cx0VEDaZ4VfeSb29_8HSSdMcqXyQbjDaua2zco6nmrnroXVWU"; e_fb_hostheader="AcJ5yZBLkbtrpWa5f1XuNR_U-PZ5HW1sSRnIqfB9-FpSMDn8R1Nj8pmQJz9mjm_BoVQ2FewG_HelE_He"; e_fb_requestsequencenumber="AcK41krIL1O7wZWlCya22Cn8YOtF4G_GLvU2D-8oSIk1-KqJ00nc0dIkaw"; e_upip="AcLVptanskDi2suuQm8r9JWXb7ABITEZuR8kwGK4oG5Aa4F4gB-WDGEnc4Smd_tNFXpVaYtxbGuOV3_sS9Q9osD5T7ggZMWVPA"; e_fb_builduser="AcIIpyaxscdHlXdVy2hUuS94PADDA7RZ9t4DM4AyL3-nKhzbMKTBi3Et0TI9SyYQUHA"; e_fb_vipport="AcKAXW1mJyQJt5y4iPnPUYJi8ySCb8d5HU84QmWOvKl2dKCWs1YTIBIE2roV"; e_clientaddr="AcKLHhgYwXtb9j7fwZKsXIG2NBy5Op4WPFgGW5wmm2OPGmXCV-RzrGrNALXUvDGbdRfLU_oQm0J5lO06JfFJ"; e_fb_vipaddr="AcIJxw_3R9BsAFSL_ZnWLCn44rL3HOHM35KTKCdkKPzrMcckyOEaQrkpcNsSKRJgU0VY2Dk"; e_fb_configversion="AcK0iNoDKJNKzNKRKDWmFNC6Pdj0Ti_eUSDm0GkED2Zn85mm6CCQPhlz4b46vw"',
      'x-fb-connection-quality': 'EXCELLENT; q=0.9, rtt=43, rtx=0, c=10, mss=1380, tbw=372, tp=-1, tpl=-1, uplat=143, ullat=0',
      'alt-svc': 'h3=":443"; ma=86400',
      connection: 'keep-alive',
      'content-length': '120'
    },
    config: {
      transitional: [Object],
      adapter: [Array],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 0,
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      env: [Object],
      validateStatus: [Function: validateStatus],
      headers: [Object [AxiosHeaders]],
      params: [Object],
      method: 'get',
      url: 'https://graph.facebook.com/v19.0/me',
      data: undefined
    },
    request: <ref *1> ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: true,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: true,
      _header: 'GET /v19.0/me?fields=email,name,accounts%7Bpicture,access_token,category,name,id%7D,id&access_token=ChdgKov8IRtiAuPtQCOAivIUW9WlbuTSQgBJYwruWylZ9yqIL3akyT2s7oFzUcBqNocwHtO09qBbZ7H5qdPvdlWMWoZgFPbGnokJBdL0epce7iIfRN6zMeAg6kxXmSiZW1R1TKt9YTIxYtQf7Qm9o7vipDVor9UDgIFEezqH2bAue7iXOHlexXQDuMJGgU4aIJa2YkcROTqtSRGW0uMHIQDHyMDBEPxKOqLUEsziVEK5RIG61CeFV1GlXPwdca1 HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'User-Agent: axios/1.6.8\r\n' +
        'Accept-Encoding: gzip, compress, deflate, br\r\n' +
        'Host: graph.facebook.com\r\n' +
        'Connection: keep-alive\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/v19.0/me?fields=email,name,accounts%7Bpicture,access_token,category,name,id%7D,id&access_token=ChdgKov8IRtiAuPtQCOAivIUW9WlbuTSQgBJYwruWylZ9yqIL3akyT2s7oFzUcBqNocwHtO09qBbZ7H5qdPvdlWMWoZgFPbGnokJBdL0epce7iIfRN6zMeAg6kxXmSiZW1R1TKt9YTIxYtQf7Qm9o7vipDVor9UDgIFEezqH2bAue7iXOHlexXQDuMJGgU4aIJa2YkcROTqtSRGW0uMHIQDHyMDBEPxKOqLUEsziVEK5RIG61CeFV1GlXPwdca1',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'graph.facebook.com',
      protocol: 'https:',
      _redirectable: [Writable],
      [Symbol(shapeMode)]: false,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kChunkedBuffer)]: [],
      [Symbol(kChunkedLength)]: 0,
      [Symbol(kSocket)]: [TLSSocket],
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    data: { error: [Object] }
  }
}

flutter doctor -v

[✓] Flutter (Channel stable, 3.19.6, on macOS 14.5 23F79 darwin-arm64, locale en-US)
    • Flutter version 3.19.6 on channel stable at /Users/apple/Downloads/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (7 weeks ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/apple/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.88.1)
    • VS Code at /Users/apple/Downloads/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • iPhone 15 Pro (mobile) • A40C757F-A725-4B5D-859B-5FBE2EA9B6B7 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 14.5 23F79 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 125.0.6422.142
    ! Error: Browsing on the local area network for Shubham’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area
      network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
    ! Error: Browsing on the local area network for Pattu. Ensure the device is unlocked and attached with a cable or associated with the same local area network as
      this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
    ! Error: Browsing on the local area network for Yashi’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area
      network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Info.plist (iOS)

No response

Podfile (iOS)

No response

AndroidManifest.xml

No response

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response

@PSBARTERGRAM PSBARTERGRAM changed the title Accesstoken is generated by android is working but when generated by the ios is giving error (data: undefined) Accesstoken is generated by android is working but when generated by the ios is giving error (Authentication error: AxiosError: Request failed with status code 400) Jun 6, 2024
@DevineStar24
Copy link

Can you please share your contact email here ?

@PSBARTERGRAM
Copy link
Author

PSBARTERGRAM commented Jun 11, 2024 via email

@DevineStar24
Copy link

@.***

On Tue, Jun 11, 2024, 9:24 PM DevineStar24 @.> wrote: Can you please share your contact email here ? — Reply to this email directly, view it on GitHub <#411 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BIBMELKWOROVJARU5J6WDQTZG4MTDAVCNFSM6AAAAABI4OSYAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRGEYDKMJRGA . You are receiving this because you authored the thread.Message ID: @.>

Not getting your email

@darwin-morocho
Copy link
Owner

I have recived this message from meta.

There have been changes made to the Facebook Login SDK for iOS that require your action.

As of late March, we have made changes to our iOS FBLogin SDK in response to the overall changes to iOS that will affect all iOS developers who utilize FBLogin. In order to avoid potential app disruption, we are recommending iOS developers to do one of the following, based on how their application is utilizing FBLogin:
Developers currently using Limited Login and/or manual endpoints: Update the Facebook Login SDK to the most recent version and update any Limited Login endpoint domains within your application to the new Limited Login endpoint (as shown here).
Developers not currently using Limited Login: We recommend you update the Facebook Login SDK to the most recent version, integrate Limited Login into your application, and update any Limited Login endpoint domains within your application to the new Limited Login endpoint (as shown here). Alternatively, you can update the Facebook Login SDK to the most recent version without integrating Limited Login into your application. However, if you do not integrate Limited Login, you will need to handle all Graph API calls using Graph API, iOS. Any Graph API, iOS calls that do not fall within these permissions will fail. Also, please note that the access token will not be valid.
You can learn more about how to implement these changes here. You can also visit our FAQ for more information.

It seems I need to update the ios sdk to the lastest version.

I will try to do it in these days

https://developers.facebook.com/docs/facebook-login/limited-login/faq/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants