Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: upgrade Facebook SDK #1105

Merged
merged 5 commits into from
Oct 9, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions facebook/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ android {
}

dependencies {
api "com.facebook.android:facebook-login:6.3.0"
api "com.facebook.android:facebook-login:8.2.0"
implementation project(":parse")

testImplementation "junit:junit:4.13"
testImplementation "org.mockito:mockito-core:1.10.19"
testImplementation "org.robolectric:robolectric:3.8"
testImplementation "org.robolectric:robolectric:4.2.1"
}

apply from: "https://raw.githubusercontent.com/Commit451/gradle-android-javadocs/1.1.0/gradle-android-javadocs.gradle"
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import com.facebook.FacebookSdk;
import com.facebook.login.LoginManager;
import com.facebook.login.LoginResult;
import com.parse.boltsinternal.Task;
import com.parse.boltsinternal.TaskCompletionSource;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
Expand All @@ -36,8 +38,6 @@
import java.util.Set;
import java.util.SimpleTimeZone;

import com.parse.boltsinternal.Task;

class FacebookController {

/**
Expand Down Expand Up @@ -104,7 +104,7 @@ public Task<Map<String, String>> authenticateAsync(
new RuntimeException("Unable to authenticate when another authentication is in process"));
}

final Task<Map<String, String>>.TaskCompletionSource tcs = Task.create();
final TaskCompletionSource<Map<String, String>> tcs = new TaskCompletionSource<>();
LoginManager manager = facebookSdkDelegate.getLoginManager();

callbackManager = facebookSdkDelegate.createCallbackManager();
Expand Down Expand Up @@ -212,7 +212,7 @@ public void setAuthData(Map<String, String> authData)
String permissionsCommaDelineated = authData.get(KEY_PERMISSIONS);
Set<String> permissions = null;
if (permissionsCommaDelineated != null && !permissionsCommaDelineated.isEmpty()) {
String permissionsArray[] = permissionsCommaDelineated.split(",");
String[] permissionsArray = permissionsCommaDelineated.split(",");
permissions = new HashSet<>(Arrays.asList(permissionsArray));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void testGetAuthData() {

FacebookController controller = new FacebookController(null);
Calendar calendar = new GregorianCalendar(2015, 6, 3);
Set<String> permissions = new HashSet<String>();
Set<String> permissions = new HashSet<>();
permissions.add("user_friends");
permissions.add("profile");

Expand Down