Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: Why is Facebook logout button is not displayed properly?

I am trying to integrate Facebook login into my iOS app (using XCode 6+ and Deployment Target is iOS 7.0). I have placed a normal UIButton to my ViewController in the storyboard and changed to custom class with FBSDKLoginButton since I needed the button in slight bigger size than originally.

The login process works great and the login button image is shown perfectly, but after login the button changes to "logout" and the background seems transparent with some strange white rectangle behind.

Here's an illustration of the issue:

enter image description here

Somebody any idea what I am doing wrong ?

like image 595
salocinx Avatar asked Jun 05 '15 13:06

salocinx


2 Answers

I'm facing the same issue using an UIButton, but I changed it to an UIView and it is working perfectly. Probably go with that approach, or implement a custom button (Objective-C)

https://developers.facebook.com/docs/facebook-login/ios/advanced#custom-login-button

like image 177
JDDelgado Avatar answered Oct 21 '22 05:10

JDDelgado


I have the same issue when i used the storyboard to implement the FaceBook login and logout button. You have just to drag a view to your view controller and add custom class for this view named "FBSDKLoginButton" then set it to a clear background.

like image 2
Sami20722 Avatar answered Oct 21 '22 05:10

Sami20722