From ebade41fa4cb931f203f45f912eb6aa90912fc53 Mon Sep 17 00:00:00 2001 From: Amine Laadhari Date: Thu, 10 Dec 2015 14:19:13 -0500 Subject: [PATCH 1/2] Check if login listener is not null to avoid null pointer exceptions --- .../main/java/com/sromku/simple/fb/SessionManager.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/simple-fb/src/main/java/com/sromku/simple/fb/SessionManager.java b/simple-fb/src/main/java/com/sromku/simple/fb/SessionManager.java index 529c664..86f560b 100644 --- a/simple-fb/src/main/java/com/sromku/simple/fb/SessionManager.java +++ b/simple-fb/src/main/java/com/sromku/simple/fb/SessionManager.java @@ -63,12 +63,16 @@ public void onSuccess(LoginResult loginResult) { @Override public void onCancel() { - loginListener.onFail("User canceled the permissions dialog"); + if (loginListener != null) { + loginListener.onFail("User canceled the permissions dialog"); + } } @Override public void onError(FacebookException e) { - loginListener.onException(e); + if (loginListener != null) { + loginListener.onException(e); + } } } From 0f24baf3712eb574c7d6f2a89cec911b02803d15 Mon Sep 17 00:00:00 2001 From: Amine Laadhari Date: Mon, 20 Mar 2017 14:49:24 +0100 Subject: [PATCH 2/2] Update facebook dependency --- simple-fb/build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/simple-fb/build.gradle b/simple-fb/build.gradle index 5095f33..dbd495d 100644 --- a/simple-fb/build.gradle +++ b/simple-fb/build.gradle @@ -44,8 +44,8 @@ ext { allLicenses = ["Apache-2.0"] } -apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' -apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle' +//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' +//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle' buildscript { repositories { @@ -65,8 +65,8 @@ allprojects { } dependencies { - compile 'com.facebook.android:facebook-android-sdk:4.7.+' - // compile project(':facebook') - compile 'com.google.code.gson:gson:1.7.2' + compile 'com.android.support:support-v4:23.0.1' + compile 'com.facebook.android:facebook-android-sdk:4.11.0' + compile 'com.google.code.gson:gson:2.4' }