Coder Social home page Coder Social logo

Comments (6)

thechaudharysab avatar thechaudharysab commented on June 25, 2024 2

I don't know. But there is no actual error message here, so there is nothing to go on, I will not make any progress and thus will have to wait for more information.

I just did a build today using this library though, it worked fine. I suggest trying the example from this repo, perhaps with a npx react-native-clean-project first.

It turns out I never added the blank File.swift to make bridging headers. Doing so I'm no longer getting those long errors but when I click on the custom login button component I have:

            <ButtonWithIcon
                iconPath={require('../assets/icons/fb-icon.png')}
                title={'Continue with Facebook'}
                pressEvent={() => {
                    LoginManager.logInWithPermissions(["public_profile", "email"]).then(
                        function (result) {
                            if (result.isCancelled) {
                                alert("Login Cancelled " + result)
                            } else {
                                alert("Login success with  permisssions: " + result.grantedPermissions.toString());
                                alert("Login Success " + result.toString());
                            }
                        },
                        function (error) {
                            alert("Login failed with error: " + error);
                        }
                    )
                }} />

Nothing happens like nothing in the console or anywhere.

Then I tried implementing using LoginButton which I added as:

            <LoginButton
                onLoginFinished={
                    (error, result) => {
                        if (error) {
                            console.log("login has error: " + result.error);
                        } else if (result.isCancelled) {
                            console.log("login is cancelled.");
                        } else {
                            AccessToken.getCurrentAccessToken().then(
                                (data) => {
                                    console.log(data.accessToken.toString())
                                }
                            )
                        }
                    }
                }
                onLogoutFinished={() => console.log("logout.")} />

When I click on LoginButton the app just crashes without any error in the console log or anywhere.

So, I opened Xcode ad directly run the app from there and upon clicking the custom button I get this error:

[native] Exception 'fbMY_APP_ID is not registered as a URL scheme. Please add it in your Info.plist' was thrown while invoking logInWithPermissions on target FBLoginManager with params (
(
"public_profile",
email
),
2816,
2817
)

and

Attempt to present <UIViewController: 0x7fb3dcc581f0> on <UIViewController: 0x7fb3df116650> (from <UIViewController: 0x7fb3df116650>) whose view is not in the window hierarchy.

So I looked for the updated my. info.plist to this:

    <array>
        <dict>
            <key>URL Schemes</key>
            <array>
                <string>fb403240190770482</string>
            </array>
        </dict>
    </array>
    <key>FacebookAppID</key>
    <string>403240190770482</string>
    <key>FacebookDisplayName</key>
    <string>doconcall (DEV)</string>
    <key>LSApplicationQueriesSchemes</key>
    <array>
      <string>fbapi</string>
      <string>fb-messenger-share-api</string>
      <string>fbauth2</string>
      <string>fbshareextension</string>
    </array>

But that also didn't work, then I copied and pasted the info.plist exactly as given in the example and it works.

from react-native-fbsdk-next.

mikehardy avatar mikehardy commented on June 25, 2024

I am not able to see any actual error message in the info you pasted

I see notices that there was an error message, but where is the actual error message?

from react-native-fbsdk-next.

thechaudharysab avatar thechaudharysab commented on June 25, 2024

I am not able to see any actual error message in the info you pasted

I see notices that there was an error message, but where is the actual error message?

How should I find that out? Because I've pasted the entire log it shows when it fails. I'm not able to run the app it crashes with that long log of things in the Bug report section.

from react-native-fbsdk-next.

mikehardy avatar mikehardy commented on June 25, 2024

I don't know. But there is no actual error message here, so there is nothing to go on, I will not make any progress and thus will have to wait for more information.

I just did a build today using this library though, it worked fine. I suggest trying the example from this repo, perhaps with a npx react-native-clean-project first.

from react-native-fbsdk-next.

jqn avatar jqn commented on June 25, 2024

I think the confusion is here:

  <key>CFBundleURLSchemes</key>
  <array>
    <string>fbAPP-ID</string>
  </array>

The docs say " replace APP-ID with your App ID" but it's not clear about the format needed here which should be:

  <key>CFBundleURLSchemes</key>
  <array>
    <string>fb403240190770482</string>
  </array>

hence keep the fb and add your APP-ID after that.

from react-native-fbsdk-next.

karel-mistrik avatar karel-mistrik commented on June 25, 2024

Hello, I'm kinda late to this thread but this is what helped me with similar error

https://stackoverflow.com/questions/70069228/getting-ld-symbols-not-found-for-architecture-x86-64-clang-on-one-of-nearly

from react-native-fbsdk-next.

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.