Facebook SDK v4 LoginButton ignores XML customizations

I managed to get the desired result by following the following steps: Opened the Facebook SDK 3.x LoginButton code and saw how the button was styled there: this.setBackgroundResource(R.drawable.com_facebook_button_blue); this.setCompoundDrawablesWithIntrinsicBounds( R.drawable.com_facebook_inverse_icon, 0, 0, 0); this.setCompoundDrawablePadding(getResources().getDimensionPixelSize( R.dimen.com_facebook_loginview_compound_drawable_padding)); this.setPadding(getResources().getDimensionPixelSize( R.dimen.com_facebook_loginview_padding_left), getResources().getDimensionPixelSize( R.dimen.com_facebook_loginview_padding_top), getResources().getDimensionPixelSize( R.dimen.com_facebook_loginview_padding_right), getResources().getDimensionPixelSize( R.dimen.com_facebook_loginview_padding_bottom)); Based on the solution presented in this answer, I changed the button … Read more

Get email and name Facebook SDK v4.4.0 Swift

I’ve used fields in android, so I figured to try it in iOS as well, and it works. let req = FBSDKGraphRequest(graphPath: “me”, parameters: [“fields”:”email,name”], tokenString: accessToken.tokenString, version: nil, HTTPMethod: “GET”) req.startWithCompletionHandler({ (connection, result, error : NSError!) -> Void in if(error == nil) { print(“result \(result)”) } else { print(“error \(error)”) } } ) result … Read more

Custom Facebook Login Button – Android

Step 1: First add FrameLayout and make facebook button visibility=”gone” and add your custom button. Don’t forgot to put xmlns:facebook=”http://schemas.android.com/apk/res-auto” in your main layout. <FrameLayout android:id=”@+id/FrameLayout1″ android:layout_width=”match_parent” android:layout_height=”wrap_content” > <com.facebook.login.widget.LoginButton android:id=”@+id/login_button” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:visibility=”gone” /> <Button android:id=”@+id/fb” android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:background=”#416BC1″ android:onClick=”onClick” android:text=”FaceBook” android:textColor=”#ffffff” android:textStyle=”bold” /> </FrameLayout> Step 2: Initialize FacebookSdk in onCreate before inflecting layout. … Read more

FBSDK Login Error Code: 308 in Objective-C

The solution below works for iOS9 + running on Xcode 8, for Swift3.0 The steps are Setup Facebook Launch FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions) Setup Open Url guard let source = options[UIApplicationOpenURLOptionsSourceApplicationKey] as? String else { return false } let annotation = options[UIApplicationOpenURLOptionsAnnotationKey] as? String return FBSDKApplicationDelegate.sharedInstance().application(application, open: url, sourceApplication: source, annotation: annotation) Fix Keychain permission issue … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)