facebook-sdk-4.0

Gradle error after including facebook sdk

不打扰是莪最后的温柔 提交于 2019-12-01 01:20:09
问题 Immediately after adding the facebook-audience-network-sdk in my gradle file, I started getting errors, the first one I fixed my adding multiDexEnabled true, after that I keep getting this error Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzqa.class Here are my dependencies list in build.gradle dependencies { compile fileTree(dir: 'libs'

Parse Facebook logInInBackgroundWithReadPermissions (Swift)

我只是一个虾纸丫 提交于 2019-11-30 16:57:43
I have set both Parse (1.7.1) SDKs and Facebook(v4) SDKs successfully, set bridging header files and AppDelegate.swift. Now in my ViewController, I am trying to create a Facebook Login and I am trying to use the code given in 'Parse iOS Documentation - Facebook SignUp & Login' . PFFacebookUtils.logInInBackgroundWithReadPermissions(permissions, { (user: PFUser!, error: NSError!) -> Void in if let user = user { if user.isNew { println("User signed up and logged in through Facebook!") } else { println("User logged in through Facebook!") } } else { println("Uh oh. The user cancelled the Facebook

Parse Facebook logInInBackgroundWithReadPermissions (Swift)

扶醉桌前 提交于 2019-11-30 16:17:44
问题 I have set both Parse (1.7.1) SDKs and Facebook(v4) SDKs successfully, set bridging header files and AppDelegate.swift. Now in my ViewController, I am trying to create a Facebook Login and I am trying to use the code given in 'Parse iOS Documentation - Facebook SignUp & Login'. PFFacebookUtils.logInInBackgroundWithReadPermissions(permissions, { (user: PFUser!, error: NSError!) -> Void in if let user = user { if user.isNew { println("User signed up and logged in through Facebook!") } else {

Facebook SDK v4.0 for iOS - FBSDKProfile currentProfile not being set

久未见 提交于 2019-11-30 12:00:15
问题 I've just "upgraded" my Facebook SDK to 4.0 for my iOS app. I've got the log in working okay, however, according to the documentation, I'm now supposed to use FBSDKProfile.currentProfile() to access profile information. However, this value always seems to be nil , even though my profile picture is being displayed (through a FBSDKProfilePictureView ) and my FBSDKAccessToken.currentAccessToken() is not nil . This is my login ViewController: import UIKit class LoginViewController:

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

我的未来我决定 提交于 2019-11-30 07:48:54
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? 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_marginLeft="30dp"/> For Facebook SDK v4.x ( or rather than using separate xml style or programmatically ) The

Reset Facebook Token Reference - Facebook SDK 4.0

 ̄綄美尐妖づ 提交于 2019-11-30 06:59:37
问题 I previously used the following to clear and reset the Facebook access token [FBSession.activeSession closeAndClearTokenInformation]; Since the update to 4.0 this no longer works. FBSession.activeSession has changed to [FBSDKAccessToken currentAccessToken] . I however can't find the latest version of closeAndClearTokenInformation that works with the latest version. Any suggestions? 回答1: FBSDKLoginManager *logMeOut = [[FBSDKLoginManager alloc] init]; [logMeOut logOut]; or [FBSDKAccessToken

Logout from Facebook programmatically iOS

倖福魔咒の 提交于 2019-11-30 04:20:17
I am trying to logout from Facebook programmatically without using FBSDKLoginButton i had search how could I do i found this answer Can we logout facebook programatically but the problem is the FBSession is deprecated in new iOS FBSDK version my question is Is there any way to clear the fb session in the new iOS FBSDK version? if there any way to logout from Facebook programmatically? or how could I call the logout action from FBSDKLoginButton Thanking in advance :) You have two methods to logout. First, as suggested by Inder Kumar Rathore FBSDKLoginManager *loginManager = [[FBSDKLoginManager

Parse invalid session token (Code: 209, Version: 1.7.1)

我的梦境 提交于 2019-11-30 04:18:52
I have just update both my Parse and Facebook SDK's (1.7.1 and 4.0 respectively) - both were an absolute pain to get working I might add! However I now getting 209 errors when I try to log in with Facebook. Here's an example of my code: - (void)loginWithFacebook:(HMSuccessBlock)completion{ NSArray *permissionsArray = @[@"user_about_me",@"user_location",@"user_friends",@"user_relationships"]; // Login PFUser using Facebook [PFFacebookUtils logInInBackgroundWithReadPermissions:permissionsArray block:^(PFUser *user, NSError *error) { if (!user) { NSLog(@"Uh oh. The user cancelled the Facebook

Facebook SDK v4.0 for iOS - FBSDKProfile currentProfile not being set

女生的网名这么多〃 提交于 2019-11-30 01:49:25
I've just "upgraded" my Facebook SDK to 4.0 for my iOS app. I've got the log in working okay, however, according to the documentation, I'm now supposed to use FBSDKProfile.currentProfile() to access profile information. However, this value always seems to be nil , even though my profile picture is being displayed (through a FBSDKProfilePictureView ) and my FBSDKAccessToken.currentAccessToken() is not nil . This is my login ViewController: import UIKit class LoginViewController: UIViewController, FBSDKLoginButtonDelegate { @IBOutlet weak var fbLoginButton: FBSDKLoginButton! @IBOutlet weak var

Any Example showing how to login using Facebook SDK 4.0 in Android either by using own button or Facebook Button?

狂风中的少年 提交于 2019-11-29 19:54:16
Is there any tutorial or example showing how to login using own Button using Facebook SDK 4.0 in Android ? I am not getting anywhere and using facebook developers site it is difficult to understand.Like below when calling FBlogin button I want to check go for login if user has not logged in or if logged in I want the access token to get facebook profile information and user likes. FBlogin.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //Facebook login Code to get profile info and user likes } }); I have tried also loginButton Facebook. <com.facebook