From e00acead28b1a7849722b30e3718ce4face4b93e Mon Sep 17 00:00:00 2001 From: Hans Knoechel Date: Mon, 11 Jul 2016 10:56:49 +0200 Subject: [PATCH 1/7] [MOD-2287] Add missing login button properties --- apidoc/Facebook.yml | 39 ++++++++++++++++ apidoc/LoginButton.yml | 17 ++++++- ios/Classes/FacebookLoginButton.m | 78 +++++++++++++++++++++++-------- ios/Classes/FacebookModule.m | 7 +++ 4 files changed, 120 insertions(+), 21 deletions(-) diff --git a/apidoc/Facebook.yml b/apidoc/Facebook.yml index e6e5d910..778a87ea 100644 --- a/apidoc/Facebook.yml +++ b/apidoc/Facebook.yml @@ -1186,6 +1186,45 @@ properties: since: 4.0.0 platforms: [android] + - name: LOGIN_BUTTON_TOOLTIP_BEHAVIOR_AUTOMATIC + summary: | + The default behavior. The tooltip will only be displayed if the app is eligible + (determined by possible server round trip). + type: Number + permission: read-only + since: "6.0.0" + platforms: [iphone, ipad] + + - name: LOGIN_BUTTON_TOOLTIP_BEHAVIOR_FORCE_DISPLAY + summary: Force display of the tooltip (typically for UI testing). + type: Number + permission: read-only + since: "6.0.0" + platforms: [iphone, ipad] + + - name: LOGIN_BUTTON_TOOLTIP_BEHAVIOR_DISABLE + summary: | + Force disable. In this case you can still exert more refined control by manually + constructing a new login button. + type: Number + permission: read-only + since: "6.0.0" + platforms: [iphone, ipad] + + - name: LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY + summary: Dark gray background, white text, light gray close button. + type: Number + permission: read-only + since: "6.0.0" + platforms: [iphone, ipad] + + - name: LOGIN_BUTTON_TOOLTIP_STYLE_FRIENDLY_BLUE + summary: Light blue background, white text, faded blue close button. + type: Number + permission: read-only + since: "6.0.0" + platforms: [iphone, ipad] + - name: SSO_WITH_FALLBACK summary: Attempt single sign-on, then fallback to dialog authorization. description: | diff --git a/apidoc/LoginButton.yml b/apidoc/LoginButton.yml index 919b5312..c4f69fe4 100644 --- a/apidoc/LoginButton.yml +++ b/apidoc/LoginButton.yml @@ -92,10 +92,23 @@ properties: type: Array since: 4.0.0 + - name: tooltipBehavior + summary: Gets or sets the desired tooltip behavior. + since: "6.0.0" + constants: [Modules.Facebook.LOGIN_BUTTON_TOOLTIP_BEHAVIOR_*] + platforms: [iphone, ipad] + + - name: tooltipColorStyle + summary: Gets or sets the desired tooltip color style. + since: "6.0.0" + constants: [Modules.Facebook.LOGIN_BUTTON_TOOLTIP_STYLE_*] + platforms: [iphone, ipad] + - name: sessionLoginBehavior summary: Login behavior for the session. - since: 4.0.0 - removed: 5.0.0 + deprecated: + since: 4.0.0 + removed: 5.0.0 platforms: [android] type: Number default: Modules.Facebook.SSO_WITH_FALLBACK diff --git a/ios/Classes/FacebookLoginButton.m b/ios/Classes/FacebookLoginButton.m index 9e82c6f9..c9210621 100644 --- a/ios/Classes/FacebookLoginButton.m +++ b/ios/Classes/FacebookLoginButton.m @@ -16,10 +16,10 @@ -(void)dealloc [super dealloc]; } --(FBSDKLoginButton*)login +-(FBSDKLoginButton*)loginButton { if (login == nil) { - login = [[FBSDKLoginButton alloc] init]; + login = [FBSDKLoginButton new]; [self addSubview:login]; } return login; @@ -27,31 +27,71 @@ -(FBSDKLoginButton*)login -(void)frameSizeChanged:(CGRect)frame bounds:(CGRect)bounds { - [TiUtils setView:[self login] positionRect:bounds]; + [TiUtils setView:[self loginButton] positionRect:bounds]; } -//Requested permissions when logging in. If set, do not set read permissions. -//audience defaults to AUDIENCE_ONLY_ME if not specifically set --(void)setPublishPermissions_:(id)publishPermissions +// Requested permissions when logging in. If set, do not set read permissions +// The audience defaults to AUDIENCE_ONLY_ME if not specifically set. +-(void)setPublishPermissions_:(id)args { - ENSURE_ARRAY(publishPermissions); - FBSDKLoginButton *loginBtn = [self login]; - loginBtn.publishPermissions = publishPermissions; + ENSURE_ARRAY(args); + [[self loginButton] setPublishPermissions:args]; } -//Requested permissions when logging in. If set, do not set publish permissions. --(void)setReadPermissions_:(id)readPermissions +-(NSArray*)publishPermissions { - ENSURE_ARRAY(readPermissions); - FBSDKLoginButton *loginBtn = [self login]; - loginBtn.readPermissions = readPermissions; + return [[self loginButton] publishPermissions]; } -//default is AUDIENCE_ONLY_ME, only applicable to publish permissions --(void)setAudience_:(id)audience +// Requested permissions when logging in. If set, do not set publish permissions +-(void)setReadPermissions_:(id)args { - ENSURE_SINGLE_ARG(audience, NSNumber); - FBSDKLoginButton *loginBtn = [self login]; - loginBtn.defaultAudience = [audience intValue]; + ENSURE_ARRAY(args); + [[self loginButton] setReadPermissions:args]; } + +-(NSArray*)readPermissions +{ + return [[self loginButton] readPermissions]; +} + +// The default is AUDIENCE_ONLY_ME, only applicable to publish permissions +-(void)setAudience_:(id)value +{ + ENSURE_SINGLE_ARG(value, NSNumber); + [[self loginButton] setDefaultAudience:[TiUtils intValue:value]]; +} + +// The default audience to use, if publish permissions are requested at login time. +-(NSNumber*)audience +{ + return [[self loginButton] defaultAudience]; +} + +// Sets the desired tooltip behavior +-(void)setTooltipBehavior_:(id)value +{ + ENSURE_SINGLE_ARG(value, NSNumber); + [[self loginButton] setTooltipBehavior:[TiUtils intValue:value]]; +} + +// Gets the desired tooltip behavior +-(NSNumber*)tooltipBehavior +{ + return [[self loginButton] tooltipBehavior]; +} + +// Sets the desired tooltip color style +-(void)setTooltipColorStyle_:(id)value +{ + ENSURE_SINGLE_ARG(value, NSNumber); + [[self loginButton] setTooltipColorStyle:[TiUtils intValue:value]]; +} + +// Gets the desired tooltip color style +-(NSNumber*)tooltipColorStyle +{ + return [[self loginButton] tooltipColorStyle]; +} + @end diff --git a/ios/Classes/FacebookModule.m b/ios/Classes/FacebookModule.m index d31b47bf..954f4a15 100644 --- a/ios/Classes/FacebookModule.m +++ b/ios/Classes/FacebookModule.m @@ -299,6 +299,13 @@ -(id)MESSENGER_BUTTON_STYLE_WHITE_BORDERED MAKE_SYSTEM_PROP(SHARE_DIALOG_MODE_FEED_BROWSER, FBSDKShareDialogModeFeedBrowser); MAKE_SYSTEM_PROP(SHARE_DIALOG_MODE_FEED_WEB, FBSDKShareDialogModeFeedWeb); +MAKE_SYSTEM_PROP(LOGIN_BUTTON_TOOLTIP_BEHAVIOR_AUTOMATIC, FBSDKLoginButtonTooltipBehaviorAutomatic); +MAKE_SYSTEM_PROP(LOGIN_BUTTON_TOOLTIP_BEHAVIOR_FORCE_DISPLAY, FBSDKLoginButtonTooltipBehaviorForceDisplay); +MAKE_SYSTEM_PROP(LOGIN_BUTTON_TOOLTIP_BEHAVIOR_DISABLE, FBSDKLoginButtonTooltipBehaviorDisable); + +MAKE_SYSTEM_PROP(LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY, FBSDKTooltipColorStyleNeutralGray); +MAKE_SYSTEM_PROP(LOGIN_BUTTON_TOOLTIP_STYLE_FRIENDLY_BLUE, FBSDKTooltipColorStyleFriendlyBlue); + /** * JS example: * From aa85b98132ef3dfb00f76cbc52d1be3519cc18c5 Mon Sep 17 00:00:00 2001 From: Hans Knoechel Date: Sat, 27 Aug 2016 15:32:41 +0200 Subject: [PATCH 2/7] [MOD-2287] Add tooltip-properties on Android, docs --- android/src/facebook/LoginButtonView.java | 10 ++++++++++ android/src/facebook/TiFacebookModule.java | 10 ++++++++++ apidoc/Facebook.yml | 20 ++++++++++---------- apidoc/LoginButton.yml | 8 ++++---- 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/android/src/facebook/LoginButtonView.java b/android/src/facebook/LoginButtonView.java index 51027a80..81c3314c 100644 --- a/android/src/facebook/LoginButtonView.java +++ b/android/src/facebook/LoginButtonView.java @@ -79,6 +79,16 @@ public void processProperties(KrollDict props) break; } } + if (props.containsKey("tooltipBehavior")) { + Object value = props.get("tooltipBehavior"); + int tooltipBehavior = TiConvert.toInt(value, TiFacebookModule.LOGIN_BUTTON_TOOLTIP_BEHAVIOR_AUTOMATIC); + loginButton.setToolTipMode(tooltipBehavior); + } + if (props.containsKey("tooltipColorStyle")) { + Object value = props.get("tooltipColorStyle"); + String tooltipColorStyle = TiConvert.toString(value, TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY); + loginButton.setToolTipStyle(tooltipColorStyle); + } } @Override diff --git a/android/src/facebook/TiFacebookModule.java b/android/src/facebook/TiFacebookModule.java index c13d7e20..2fb6ecc0 100644 --- a/android/src/facebook/TiFacebookModule.java +++ b/android/src/facebook/TiFacebookModule.java @@ -58,6 +58,9 @@ import com.facebook.share.widget.ShareDialog.Mode; import com.facebook.share.widget.AppInviteDialog; +import com.facebook.widget.ToolTipPopup; +import com.facebook.widget.LoginButton.ToolTipMode; + import android.app.Activity; import android.content.Intent; import android.net.Uri; @@ -104,7 +107,14 @@ public class TiFacebookModule extends KrollModule implements OnActivityResultEve @Kroll.constant public static final String LOGIN_BEHAVIOR_NATIVE = "NATIVE_ONLY"; @Kroll.constant public static final String LOGIN_BEHAVIOR_NATIVE_WITH_FALLBACK = "NATIVE_WITH_FALLBACK"; @Kroll.constant public static final String LOGIN_BEHAVIOR_DEVICE_AUTH = "DEVICE_AUTH"; + + @Kroll.constant public static final int LOGIN_BUTTON_TOOLTIP_BEHAVIOR_AUTOMATIC = ToolTipMode.AUTOMATIC; + @Kroll.constant public static final int LOGIN_BUTTON_TOOLTIP_BEHAVIOR_FORCE_DISPLAY = ToolTipMode.DISPLAY_ALWAYS; + @Kroll.constant public static final int LOGIN_BUTTON_TOOLTIP_BEHAVIOR_DISABLE = ToolTipMode.NEVER_DISPLAY; + @Kroll.constant public static final String LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY = ToolTipPopup.Style.BLACK; + @Kroll.constant public static final String LOGIN_BUTTON_TOOLTIP_STYLE_FRIENDLY_BLUE = ToolTipPopup.Style.BLUE; + @Kroll.constant public static final int SHARE_DIALOG_MODE_AUTOMATIC = 0; @Kroll.constant public static final int SHARE_DIALOG_MODE_NATIVE = 1; @Kroll.constant public static final int SHARE_DIALOG_MODE_WEB = 2; diff --git a/apidoc/Facebook.yml b/apidoc/Facebook.yml index 778a87ea..d2f02a67 100644 --- a/apidoc/Facebook.yml +++ b/apidoc/Facebook.yml @@ -1192,15 +1192,15 @@ properties: (determined by possible server round trip). type: Number permission: read-only - since: "6.0.0" - platforms: [iphone, ipad] + since: "7.0.0" + platforms: [iphone, ipad, android] - name: LOGIN_BUTTON_TOOLTIP_BEHAVIOR_FORCE_DISPLAY summary: Force display of the tooltip (typically for UI testing). type: Number permission: read-only - since: "6.0.0" - platforms: [iphone, ipad] + since: "7.0.0" + platforms: [iphone, ipad, android] - name: LOGIN_BUTTON_TOOLTIP_BEHAVIOR_DISABLE summary: | @@ -1208,22 +1208,22 @@ properties: constructing a new login button. type: Number permission: read-only - since: "6.0.0" - platforms: [iphone, ipad] + since: "7.0.0" + platforms: [iphone, ipad, android] - name: LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY summary: Dark gray background, white text, light gray close button. type: Number permission: read-only - since: "6.0.0" - platforms: [iphone, ipad] + since: "7.0.0" + platforms: [iphone, ipad, android] - name: LOGIN_BUTTON_TOOLTIP_STYLE_FRIENDLY_BLUE summary: Light blue background, white text, faded blue close button. type: Number permission: read-only - since: "6.0.0" - platforms: [iphone, ipad] + since: "7.0.0" + platforms: [iphone, ipad, android] - name: SSO_WITH_FALLBACK summary: Attempt single sign-on, then fallback to dialog authorization. diff --git a/apidoc/LoginButton.yml b/apidoc/LoginButton.yml index c4f69fe4..9b173938 100644 --- a/apidoc/LoginButton.yml +++ b/apidoc/LoginButton.yml @@ -94,15 +94,15 @@ properties: - name: tooltipBehavior summary: Gets or sets the desired tooltip behavior. - since: "6.0.0" constants: [Modules.Facebook.LOGIN_BUTTON_TOOLTIP_BEHAVIOR_*] - platforms: [iphone, ipad] + since: "7.0.0" + platforms: [iphone, ipad, android] - name: tooltipColorStyle summary: Gets or sets the desired tooltip color style. - since: "6.0.0" constants: [Modules.Facebook.LOGIN_BUTTON_TOOLTIP_STYLE_*] - platforms: [iphone, ipad] + since: "7.0.0" + platforms: [iphone, ipad, android] - name: sessionLoginBehavior summary: Login behavior for the session. From d05364a4efd0c910e4bd4852c604f5755c4884b9 Mon Sep 17 00:00:00 2001 From: Hans Knoechel Date: Sat, 27 Aug 2016 15:59:26 +0200 Subject: [PATCH 3/7] [MOD-2287] Fix package-path --- android/src/facebook/TiFacebookModule.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/facebook/TiFacebookModule.java b/android/src/facebook/TiFacebookModule.java index 2fb6ecc0..4174db24 100644 --- a/android/src/facebook/TiFacebookModule.java +++ b/android/src/facebook/TiFacebookModule.java @@ -58,8 +58,8 @@ import com.facebook.share.widget.ShareDialog.Mode; import com.facebook.share.widget.AppInviteDialog; -import com.facebook.widget.ToolTipPopup; -import com.facebook.widget.LoginButton.ToolTipMode; +import com.facebook.login.widget.ToolTipPopup; +import com.facebook.login.widget.LoginButton.ToolTipMode; import android.app.Activity; import android.content.Intent; From 644c2cb94acf481bb9ecdc9f931ee220db277074 Mon Sep 17 00:00:00 2001 From: Hans Knoechel Date: Sun, 28 Aug 2016 16:21:10 +0200 Subject: [PATCH 4/7] [MOD-2287] Change way to map the constants --- android/src/facebook/LoginButtonView.java | 26 +++++++++++++++++++--- android/src/facebook/TiFacebookModule.java | 15 +++++-------- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/android/src/facebook/LoginButtonView.java b/android/src/facebook/LoginButtonView.java index 81c3314c..26656070 100644 --- a/android/src/facebook/LoginButtonView.java +++ b/android/src/facebook/LoginButtonView.java @@ -20,7 +20,8 @@ import com.facebook.CallbackManager; import com.facebook.login.DefaultAudience; import com.facebook.login.widget.LoginButton; - +import com.facebook.login.widget.ToolTipPopup; +import com.facebook.login.widget.LoginButton.ToolTipMode; public class LoginButtonView extends TiUIView { @@ -82,12 +83,31 @@ public void processProperties(KrollDict props) if (props.containsKey("tooltipBehavior")) { Object value = props.get("tooltipBehavior"); int tooltipBehavior = TiConvert.toInt(value, TiFacebookModule.LOGIN_BUTTON_TOOLTIP_BEHAVIOR_AUTOMATIC); - loginButton.setToolTipMode(tooltipBehavior); + + switch(tooltipBehavior){ + case TiFacebookModule.LOGIN_BUTTON_TOOLTIP_BEHAVIOR_AUTOMATIC: + loginButton.setToolTipMode(ToolTipMode.AUTOMATIC); + break; + case TiFacebookModule.LOGIN_BUTTON_TOOLTIP_BEHAVIOR_FORCE_DISPLAY: + loginButton.setToolTipMode(ToolTipMode.DISPLAY_ALWAYS); + break; + case TiFacebookModule.LOGIN_BUTTON_TOOLTIP_BEHAVIOR_DISABLE: + loginButton.setToolTipMode(ToolTipMode.NEVER_DISPLAY); + break; + } } if (props.containsKey("tooltipColorStyle")) { Object value = props.get("tooltipColorStyle"); String tooltipColorStyle = TiConvert.toString(value, TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY); - loginButton.setToolTipStyle(tooltipColorStyle); + + switch(tooltipColorStyle){ + case TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY: + loginButton.setToolTipStyle(ToolTipPopup.Style.BLACK); + break; + case TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_FRIENDLY_BLUE: + loginButton.setToolTipStyle(ToolTipPopup.Style.BLUE); + break; + } } } diff --git a/android/src/facebook/TiFacebookModule.java b/android/src/facebook/TiFacebookModule.java index 4174db24..a81c7edd 100644 --- a/android/src/facebook/TiFacebookModule.java +++ b/android/src/facebook/TiFacebookModule.java @@ -58,9 +58,6 @@ import com.facebook.share.widget.ShareDialog.Mode; import com.facebook.share.widget.AppInviteDialog; -import com.facebook.login.widget.ToolTipPopup; -import com.facebook.login.widget.LoginButton.ToolTipMode; - import android.app.Activity; import android.content.Intent; import android.net.Uri; @@ -108,12 +105,12 @@ public class TiFacebookModule extends KrollModule implements OnActivityResultEve @Kroll.constant public static final String LOGIN_BEHAVIOR_NATIVE_WITH_FALLBACK = "NATIVE_WITH_FALLBACK"; @Kroll.constant public static final String LOGIN_BEHAVIOR_DEVICE_AUTH = "DEVICE_AUTH"; - @Kroll.constant public static final int LOGIN_BUTTON_TOOLTIP_BEHAVIOR_AUTOMATIC = ToolTipMode.AUTOMATIC; - @Kroll.constant public static final int LOGIN_BUTTON_TOOLTIP_BEHAVIOR_FORCE_DISPLAY = ToolTipMode.DISPLAY_ALWAYS; - @Kroll.constant public static final int LOGIN_BUTTON_TOOLTIP_BEHAVIOR_DISABLE = ToolTipMode.NEVER_DISPLAY; - - @Kroll.constant public static final String LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY = ToolTipPopup.Style.BLACK; - @Kroll.constant public static final String LOGIN_BUTTON_TOOLTIP_STYLE_FRIENDLY_BLUE = ToolTipPopup.Style.BLUE; + @Kroll.constant public static final int LOGIN_BUTTON_TOOLTIP_BEHAVIOR_AUTOMATIC = 0; + @Kroll.constant public static final int LOGIN_BUTTON_TOOLTIP_BEHAVIOR_FORCE_DISPLAY = 1; + @Kroll.constant public static final int LOGIN_BUTTON_TOOLTIP_BEHAVIOR_DISABLE = 2; + + @Kroll.constant public static final String LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY = "NEUTRAL_GRAY"; + @Kroll.constant public static final String LOGIN_BUTTON_TOOLTIP_STYLE_FRIENDLY_BLUE = "FRIENDLY_BLUE"; @Kroll.constant public static final int SHARE_DIALOG_MODE_AUTOMATIC = 0; @Kroll.constant public static final int SHARE_DIALOG_MODE_NATIVE = 1; From fdb4af97b43b68f3a4abe120a3a0c5ede7c41be0 Mon Sep 17 00:00:00 2001 From: Hans Knoechel Date: Sun, 28 Aug 2016 20:18:18 +0200 Subject: [PATCH 5/7] [MOD-2287] Replace switch with if --- android/src/facebook/LoginButtonView.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/android/src/facebook/LoginButtonView.java b/android/src/facebook/LoginButtonView.java index 26656070..1396dfb8 100644 --- a/android/src/facebook/LoginButtonView.java +++ b/android/src/facebook/LoginButtonView.java @@ -84,7 +84,7 @@ public void processProperties(KrollDict props) Object value = props.get("tooltipBehavior"); int tooltipBehavior = TiConvert.toInt(value, TiFacebookModule.LOGIN_BUTTON_TOOLTIP_BEHAVIOR_AUTOMATIC); - switch(tooltipBehavior){ + switch (tooltipBehavior) { case TiFacebookModule.LOGIN_BUTTON_TOOLTIP_BEHAVIOR_AUTOMATIC: loginButton.setToolTipMode(ToolTipMode.AUTOMATIC); break; @@ -100,13 +100,10 @@ public void processProperties(KrollDict props) Object value = props.get("tooltipColorStyle"); String tooltipColorStyle = TiConvert.toString(value, TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY); - switch(tooltipColorStyle){ - case TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY: - loginButton.setToolTipStyle(ToolTipPopup.Style.BLACK); - break; - case TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_FRIENDLY_BLUE: - loginButton.setToolTipStyle(ToolTipPopup.Style.BLUE); - break; + if (tooltipColorStyle == TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY) { + loginButton.setToolTipStyle(ToolTipPopup.Style.BLACK); + } else if (tooltipColorStyle == TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_FRIENDLY_BLUE) { + loginButton.setToolTipStyle(ToolTipPopup.Style.BLUE); } } } From a52340912732b2b4df1e633106d90ca414cbde4d Mon Sep 17 00:00:00 2001 From: hansemannn Date: Sat, 24 Sep 2016 01:34:27 +0200 Subject: [PATCH 6/7] [MOD-2287] Replace == with .equals() --- android/src/facebook/LoginButtonView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/facebook/LoginButtonView.java b/android/src/facebook/LoginButtonView.java index 1396dfb8..bef33cfc 100644 --- a/android/src/facebook/LoginButtonView.java +++ b/android/src/facebook/LoginButtonView.java @@ -100,9 +100,9 @@ public void processProperties(KrollDict props) Object value = props.get("tooltipColorStyle"); String tooltipColorStyle = TiConvert.toString(value, TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY); - if (tooltipColorStyle == TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY) { + if (tooltipColorStyle.equals(TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY)) { loginButton.setToolTipStyle(ToolTipPopup.Style.BLACK); - } else if (tooltipColorStyle == TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_FRIENDLY_BLUE) { + } else if (tooltipColorStyle.equals(TiFacebookModule.LOGIN_BUTTON_TOOLTIP_STYLE_FRIENDLY_BLUE)) { loginButton.setToolTipStyle(ToolTipPopup.Style.BLUE); } } From 4885926c78496e677ecf5778aa60894fcb958b35 Mon Sep 17 00:00:00 2001 From: hansemannn Date: Tue, 4 Oct 2016 17:37:25 +0200 Subject: [PATCH 7/7] Bump versions --- android/manifest | 2 +- apidoc/Facebook.yml | 10 +++++----- apidoc/LoginButton.yml | 4 ++-- ios/manifest | 2 +- ios/module.xcconfig | 2 +- ios/titanium.xcconfig | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/android/manifest b/android/manifest index 72243451..dc602169 100644 --- a/android/manifest +++ b/android/manifest @@ -2,7 +2,7 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # -version: 6.0.1 +version: 6.1.0 apiversion: 3 architectures: armeabi-v7a x86 description: facebook diff --git a/apidoc/Facebook.yml b/apidoc/Facebook.yml index 7428e12a..1ee8c1d5 100644 --- a/apidoc/Facebook.yml +++ b/apidoc/Facebook.yml @@ -1187,14 +1187,14 @@ properties: (determined by possible server round trip). type: Number permission: read-only - since: "7.0.0" + since: "6.1.0" platforms: [iphone, ipad, android] - name: LOGIN_BUTTON_TOOLTIP_BEHAVIOR_FORCE_DISPLAY summary: Force display of the tooltip (typically for UI testing). type: Number permission: read-only - since: "7.0.0" + since: "6.1.0" platforms: [iphone, ipad, android] - name: LOGIN_BUTTON_TOOLTIP_BEHAVIOR_DISABLE @@ -1203,21 +1203,21 @@ properties: constructing a new login button. type: Number permission: read-only - since: "7.0.0" + since: "6.1.0" platforms: [iphone, ipad, android] - name: LOGIN_BUTTON_TOOLTIP_STYLE_NEUTRAL_GRAY summary: Dark gray background, white text, light gray close button. type: Number permission: read-only - since: "7.0.0" + since: "6.1.0" platforms: [iphone, ipad, android] - name: LOGIN_BUTTON_TOOLTIP_STYLE_FRIENDLY_BLUE summary: Light blue background, white text, faded blue close button. type: Number permission: read-only - since: "7.0.0" + since: "6.1.0" platforms: [iphone, ipad, android] - name: SSO_WITH_FALLBACK diff --git a/apidoc/LoginButton.yml b/apidoc/LoginButton.yml index 9b173938..afbac93b 100644 --- a/apidoc/LoginButton.yml +++ b/apidoc/LoginButton.yml @@ -95,13 +95,13 @@ properties: - name: tooltipBehavior summary: Gets or sets the desired tooltip behavior. constants: [Modules.Facebook.LOGIN_BUTTON_TOOLTIP_BEHAVIOR_*] - since: "7.0.0" + since: "6.1.0" platforms: [iphone, ipad, android] - name: tooltipColorStyle summary: Gets or sets the desired tooltip color style. constants: [Modules.Facebook.LOGIN_BUTTON_TOOLTIP_STYLE_*] - since: "7.0.0" + since: "6.1.0" platforms: [iphone, ipad, android] - name: sessionLoginBehavior diff --git a/ios/manifest b/ios/manifest index 6e1f49a3..db8d926f 100644 --- a/ios/manifest +++ b/ios/manifest @@ -2,7 +2,7 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # -version: 5.2.7 +version: 5.3.0 apiversion: 2 description: Allows Facebook integration for Titanium apps author: Mark Mokryn, Ng Chee Kiat and Hans Knoechel diff --git a/ios/module.xcconfig b/ios/module.xcconfig index cf5e38c8..793dbaed 100644 --- a/ios/module.xcconfig +++ b/ios/module.xcconfig @@ -9,7 +9,7 @@ // // How to add a Framework (example) -FRAMEWORK_SEARCH_PATHS=$(SRCROOT)/../../modules/iphone/facebook/5.2.7/platform "~/Library/Application Support/Titanium/modules/iphone/facebook/5.2.7/platform" +FRAMEWORK_SEARCH_PATHS=$(SRCROOT)/../../modules/iphone/facebook/5.3.0/platform "~/Library/Application Support/Titanium/modules/iphone/facebook/5.3.0/platform" OTHER_LDFLAGS=$(inherited) -framework Social -framework FBSDKCoreKit -framework FBSDKLoginKit -framework FBSDKShareKit -framework FBSDKMessengerShareKit -framework Bolts // // OTHER_LDFLAGS=$(inherited) -framework Foo diff --git a/ios/titanium.xcconfig b/ios/titanium.xcconfig index 0c0d6c7e..cf280d7a 100644 --- a/ios/titanium.xcconfig +++ b/ios/titanium.xcconfig @@ -4,7 +4,7 @@ // OF YOUR TITANIUM SDK YOU'RE BUILDING FOR // // -TITANIUM_SDK_VERSION = 5.5.0.GA +TITANIUM_SDK_VERSION = 5.5.1.GA //