Comments (6)
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",
),
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.
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.
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.
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.
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.
Hello, I'm kinda late to this thread but this is what helped me with similar error
from react-native-fbsdk-next.
Related Issues (20)
- [Expo] How to initialize SDK only on specific build? HOT 1
- share link url can't show preview link HOT 1
- `Could not resolve com.facebook.android:facebook-android-sdk:16.+.` due to Bad Gateway for https://oss.sonatype.org HOT 2
- IOS build failed with FBSDKCoreKit/FBSDKCoreKit.modulemap not found HOT 1
- Build error: Showing Recent Messages Error [ERR_REQUIRE_ESM]: require() of ES Module... HOT 2
- support version 17 of facebook sdk with privacy manifests HOT 14
- Will this lib be updated to meet Apple's new third party sdk privacy manifest requirement? HOT 2
- Can't change to another account on login HOT 3
- iOS limited login HOT 14
- Email not retrieving from facebook login HOT 3
- Need help for the facebook sharing HOT 1
- Facebook SDK not initialized error when using react-native-fbsdk-next with Expo HOT 7
- FbLoginManager.loginwithPermissions was called with 1 arguments butt expects 3 arguments HOT 2
- LoginManager.logOut() doesn't remove app from Facebook "Business Integrations" HOT 1
- App switches automatically to limited login when updated to v13 HOT 4
- Access Token is invalid HOT 6
- React native app - Upgrade fbsdk to version 9.0.0 HOT 1
- Mobile product ads aka Advantage+ Catalog Ads not receiving params HOT 2
- Upgrading to v13.0.0 , build failed for android HOT 6
- iOS limited login does not return all possible fields HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-fbsdk-next.