天道酬勤,学无止境

fbsdk

React Native Android: Method does not override or implement a method from a supertype

I've added react-native-fbsdk to my react native project and have it building fine on iOS. But on the android side, I can't get gradle to build the project. When trying to compile react-native-fbsdk, I'm hitting: "method does not override or implement a method from a supertype" 21:41:11.863 [INFO] [org.gradle.api.internal.tasks.compile.JdkJavaCompiler] Compiling with JDK Java compiler API. 21:41:12.100 [ERROR] [system.err] /Users/joncursi/Sites/joncursi/redbirdNative/node_modules/react-native-fbsdk/android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKPackage.java:61: error: method

2021-07-10 22:33:01    分类:问答    android   react-native   fbsdk   react-native-fbsdk

更改 FB 登录按钮文本 (react-native-fbsdk)(Change the FB login button text (react-native-fbsdk))

问题 我正在使用 react-native-fbsdk。 如何将 fb 登录按钮文本从“使用 facebook 登录”更改为“继续使用 fb”? 组件看起来像这样,我找不到改变它的方法: <LoginButton style={styles.facebookbutton} readPermissions={["public_profile", 'email']} 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); console.log(data.accessToken.toString()); } ) } } } onLogoutFinished={() => alert("logout.")}/> 回答1 最简单的方法是将SDK升级到4.19.0: LoginButton UI 在 4.19.0 中发生了变化。 该按钮现在显示

2021-06-27 19:17:00    分类:技术分享    facebook   reactjs   react-native   fbsdk   react-native-fbsdk

FBSDK: Cannot read property loginwithreadpermissions of undefined

I'm setting up a React Native project using the FBSDK for login purpose. Here's what I've done so far: I ran npm install react-native-fbsdk --save I ran react-native link I followed each step mentioned there: https://developers.facebook.com/docs/facebook-login/ios/ I double checked using this video: https://www.youtube.com/watch?v=rAXVKapP5cM However, I still get this red screen error: Cannot read property logInWithReadPermissions of undefined at FBLoginManager.js, line 77 (https://github.com/facebook/react-native-fbsdk/blob/master/js/FBLoginManager.js) Here's my AppDelegate.m content: #import

2021-06-14 08:36:17    分类:问答    javascript   ios   react-native   fbsdk

App crashes using Facebook Login SDK when I go to the home screen

I originally downloaded the FBSDK's version 4.10 and integrated them into my application by placing them in the frameworks folder. Realizing that these would not get updated over time, I removed them completely and tried to add them as pods to my project. The pods installed successfully, I have imported them correctly in my bridging header file, and there were no other issues. The pods update installed version 4.11 which has caused me some headache. I am using the FBSDKLoginKit to log a user into their account and retrieve information from that. I am able to get back a dictionary with the

2021-06-05 12:59:45    分类:问答    ios   swift   fbsdk   fbsdkloginkit

Invalid iOS Bundle [duplicate]

This question already has answers here: React Native EXPO Apple upload fail [closed] (3 answers) Closed 2 years ago. This bundle is invalid - The Info.plist file for /Payload/xxx.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle is missing or could not be read. Invalid Bundle - The bundle at '/Payload/xxx.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle' does not contain a bundle executable. I'm at the wits end now. I've spent over 6 hours trying to figure this one out. I've also manually downloaded the FB SDK for my Swift app and try to point the Framework to the

2021-05-25 16:08:50    分类:问答    ios   facebook   bundle   fbsdk

AWS Cognito Swift凭证提供程序“不建议使用登录:使用AWSIdentityProviderManager”(AWS Cognito Swift credentials provider “logins is deprecated: Use AWSIdentityProviderManager”)

问题 我试图允许用户使用Facebook和Amazon Cognito来注册我的应用程序。 我发现以前的文档说要使用: let token = FBSDKAccessToken.currentAccessToken().tokenString var logins: NSDictionary = NSDictionary(dictionary: ["graph.facebook.com" : token]) credentialsProvider.logins = [AWSIdentityProviderFacebook: token] 但是我收到一条消息,提示已弃用登录名,并使用协议AWSIdentityProviderManager向凭证提供程序提供登录名,我不知道该怎么做。 我尝试让我的类实现AWSIdentityProviderManager并创建了一个logins方法,因为我注意到凭据提供者有一个方法“ setIdentiyProviderManagerOnce(self)”,但是我不知道在实现的logins()方法中如何将Facebook令牌连接到凭据上经理。 香港专业教育学院看过亚马逊的github示例,但我似乎并没有太大帮助 回答1 环顾四周后,我终于发现我不是唯一遇到此问题的人。 AWS在不更改其主要文档的情况下更新了他们的SDK。

2021-05-09 13:25:04    分类:技术分享    swift   amazon-web-services   amazon-cognito   fbsdk

如何在iOS 9中使用Facebook SDK 4.7获取用户的电子邮件ID(How to get email id of user using facebook sdk 4.7 in ios 9)

问题 这是我的代码,我只获得用户名和用户的facebook ID。 FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init]; [login logInWithReadPermissions: @[@"public_profile",@"email",@"user_friends"] fromViewController:self handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) { if (error) { NSLog(@"Process error"); } else if (result.isCancelled) { NSLog(@"Cancelled"); } else { if ([FBSDKAccessToken currentAccessToken]) { [[[FBSDKGraphRequest alloc] initWithGraphPath:@"me" parameters:nil] startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { if (!error) { NSLog(@

2021-05-08 18:14:27    分类:技术分享    ios   objective-c   ios9.1   fbsdk

Facebook Sdk尚未初始化FacebookSdk.sdkInitialize()(Facebook Sdk Has Not Been Initialized FacebookSdk.sdkInitialize())

问题 嘿,我知道以前有人问过这个问题,但是所有解决方案似乎都无济于事。 我在应用程序中使用的是首次使用Facebook SDK。 我尝试过的 我已经尝试了Internet上发现的大多数东西,但是对此一无所获。 这是我的MainActivity.java: public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); FacebookSdk.sdkInitialize(getApplicationContext()); } } 这是我的Activitymain.xml: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:facebook="http://schemas.android.com/apk/res-auto" android:layout_width="match

2021-05-08 05:16:48    分类:技术分享    android   react-native   facebook-login   android-facebook   fbsdk

Change the FB login button text (react-native-fbsdk)

I am using react-native-fbsdk. How can I change the fb login button text from 'Login with facebook' to 'Continue with fb'? The component looks like this, and I can't find a way to change it: <LoginButton style={styles.facebookbutton} readPermissions={["public_profile", 'email']} 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); console.log(data.accessToken.toString()); } ) } } } onLogoutFinished

2021-04-26 16:17:20    分类:问答    facebook   reactjs   react-native   fbsdk   react-native-fbsdk

FBSDKAccessToken currentAccessToken退出应用程序后为零(FBSDKAccessToken currentAccessToken nil after quitting app)

问题 我正在开发使用Facebook SDK登录的ios应用程序。 我已将一个LogInViewController设置为LogInViewController中的初始View Controller,用户使用FB帐户从中登录。 我有另一个ViewController,用户登录后即可正确加载。 在AppDelegate文件中,我正在检查currentAccessToken ,如果它不是nil,则直接加载第二个ViewController,因为用户已经登录。 但是,如果我退出应用程序并重新启动,则currentAccessToken始终为nil。 仅当我按下主页按钮并在后台运行该应用程序时重新打开该应用程序时,它才有效。 以下是代码中的详细信息: AppDelegate.swift func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { self.customNavigationBar() if (!isIcloudAvailable()) { self.displayAlertWithTitle("iCloud", message: "iCloud is not available." + "

2021-04-12 11:15:49    分类:技术分享    ios   swift   facebook-login   facebook-access-token   fbsdk