facebook-sdk-4.0

How to update FBRequest.requestForMe() on facebooksdk v4.0.1?

给你一囗甜甜゛ 提交于 2019-12-19 09:53:55
问题 So, I made application on iphone. I'm using login with facebook and currently upgrade my facebooksdk to lastest version. Some of my code happen to have an error. Below is mycode: let request = FBRequest.requestForMe() request.startWithCompletionHandler({ (connection, result, error) -> Void in if error == nil { if let userData = result as? NSDictionary { let facebookId = userData["id"] as! String self.user.name = userData["name"]as! String // self._fbuser.location = userData["location"]["name"

How to change the height of the 'Log in with Facebook' button?

为君一笑 提交于 2019-12-18 12:43:23
问题 I already tried several answers I could find but none of them worked with the latest Facebook Android SDK version 4.0. How can I change the layout height with the latest SDK? 回答1: Just set paddingTop and paddingBottom. It works for me. <com.facebook.login.widget.LoginButton android:id="@+id/login_facebook_button" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="15dp" android:paddingBottom="15dp" android:layout_marginRight="30dp" android:layout

how to get email from Facebook sdk 4.0

 ̄綄美尐妖づ 提交于 2019-12-18 09:40:00
问题 I'm working on android Login with Facebook After login i want to save the data from Facebook i want to save the following data from Facebook First Name Middle Name Last Name User id profile picture Email Profile Name I tried some code which following loginButton = (LoginButton)findViewById(R.id.login_button); loginButton = (LoginButton) findViewById(R.id.login_button); loginButton.setReadPermissions(Arrays.asList("public_profile", "email", "user_friends")); loginButton.registerCallback

Facebook SDK 4.0 AppInviteDialog with callback

房东的猫 提交于 2019-12-18 03:32:29
问题 In the new Fb SDK 4.0 for Android you can register a callback for the LoginButton according to the docs. https://developers.facebook.com/docs/facebook-login/android/v2.3 The question is is this possible for the AppInviteDialog as well? Or is there any other way to identify if the App-Invite was successful or not? 回答1: Yes, this is possible. public static void openDialogInvite(final Activity activity) { String appLinkUrl, previewImageUrl; appLinkUrl = "your app link url"; previewImageUrl =

How to get the logged user's email address with Graph Request in Facebook Android sdk 4.0

久未见 提交于 2019-12-17 23:32:58
问题 I'm trying to get the user's email address once he's logged into my Android app with Facebook (sdk 4.0). I've read many posts asking the same thing but I still couldn't make it work. I simply log the user in with the code LoginManager.getInstance().logInWithReadPermissions(this, Arrays.asList("public_profile", "user_friends", "email")); Then I make the Graph API request with LoginManager.getInstance().registerCallback(fbCallbackManager, new FacebookCallback<LoginResult>() { @Override public

Use Facebook App-scoped Id for ProfilePictureView

為{幸葍}努か 提交于 2019-12-17 20:33:16
问题 I am implementing facebook's SDK for an android app. I have a ProfilePictureView , that requires, to be filled: profilePictureView.setProfileId(id) Yesterday, if I used the App-scoped Id of the profile (the one returned by Graph API) it worked: that's the only id I have, because apparently is against Facebook policy to get the "real" id. But today, without any modification, it returns a null image. I am guessing they changed the backend, but if so, what is the purpose of ProfilePictureView if

No such module 'FBSDKCoreKit' XCODE 7.4

守給你的承諾、 提交于 2019-12-17 20:18:47
问题 I am trying to add the Facebook login feature using FBSDKCoreKit and FBSDKLogin . When I try to import these two framework to my AppDelegate file, it shows error which is "No such module 'FBSDKCoreKit'". I changed Allow Non-modular Includes In Framework Modules from NO to YES , but the error is still there. I need help with coming up with a solution to resolve the error. 回答1: I resolved this problem by adding FacebookSDK Directory path to the "Framework Search Paths" Go to Build Settings and

Returning Data From Function (Swift)

て烟熏妆下的殇ゞ 提交于 2019-12-14 01:47:23
问题 I am trying to return result and be able to access result array from this function. Everything is working in the function, however I cannot return anything or access results or any variable created inside the function from outside the closure. I want to access result.valueForKey("id") from outside the closure. How can I do that? class ViewController: UIViewController, FBSDKLoginButtonDelegate { var facebookid: NSString = "" var username: NSString = "" var userEmail:NSString = "" override func

Android, Facebook Login only good for ONE login, then receives error?

大憨熊 提交于 2019-12-13 19:26:52
问题 I am using the new Facebook SDK (4.0.0). I am implementing a FB login, and it works fine for ONE login, but if you log out and then try to log in again, you get the following error: This is all without closing the app, or modifying code or anything. Just log in, then out, then attempt to log in again. The hash (blacked out) isn't even the same hash that my computer provides. There are similar threads talking about this problem, but no easy solutions, other than the remedy discussed below. The

Android manifest merger with facebook and firebase libraries

强颜欢笑 提交于 2019-12-13 13:00:03
问题 I've imported in my project 2 libraries (in gradle file): ... /* Firebase UI */ compile 'com.firebaseui:firebase-ui:0.4.0' /* Facebook login */ compile 'com.facebook.android:facebook-android-sdk:4.13.0' but when building my project I have the following error: D:\Android\Projects\quoter\app\src\main\AndroidManifest.xml:68:13-58 Error: Attribute activity#com.facebook.FacebookActivity@theme value=(@style/FirebaseUI.Translucent) from [com.firebaseui:firebase-ui-auth:0.4.0] AndroidManifest.xml:68