public class SnapLogin
extends java.lang.Object
Constructor and Description |
---|
SnapLogin() |
Modifier and Type | Method and Description |
---|---|
static void |
fetchUserData(Context context,
java.lang.String query,
java.util.Map<java.lang.String,java.lang.Object> variables,
FetchUserDataCallback callback)
Deprecated.
|
static SnapLoginApi |
getApi(Context context)
Method to get the Login Kit API.
|
static AuthTokenManager |
getAuthTokenManager(Context context)
Getter for AuthTokenManager.
|
static View |
getButton(Context context,
ViewGroup container)
Method to get a standard "login" button to authenticate using Snapchat.
|
static View |
getButtonWithFlags(Context context,
ViewGroup container,
com.snapchat.kit.sdk.core.models.SnapKitFeatureOptions snapKitFeatureOptions)
Method to get a standard "login" button to authenticate using Snapchat.
|
static LoginStateController |
getLoginStateController(Context context)
Getter for the Login State Controller.
|
static java.lang.String |
getVersion() |
static boolean |
isUserLoggedIn(Context context)
Getter to know if user is authenticated using Snapchat and has a valid auth token.
|
public static SnapLoginApi getApi(@NonNull Context context)
context
- of your Activity/Application.SnapLoginApi
.public static View getButton(Context context, ViewGroup container)
context
- The activity's context.container
- The root container to inflate and attach the login button to.public static java.lang.String getVersion()
public static View getButtonWithFlags(Context context, ViewGroup container, com.snapchat.kit.sdk.core.models.SnapKitFeatureOptions snapKitFeatureOptions)
context
- The activity's context.container
- The root container to inflate and attach the login button to.snapKitFeatureOptions
- The flags to be included in the Snapchat login request triggered
when the returned button is pressed.public static LoginStateController getLoginStateController(Context context)
context
- Your Application's context.public static boolean isUserLoggedIn(Context context)
context
- The activity context.public static AuthTokenManager getAuthTokenManager(Context context)
context
- The activity context.public static void fetchUserData(@NonNull Context context, @NonNull java.lang.String query, @Nullable java.util.Map<java.lang.String,java.lang.Object> variables, @NonNull FetchUserDataCallback callback)
SnapLoginApi.fetchUserData(UserDataQuery, UserDataResultCallback)
instead.context
- Your activity context.query
- The GraphQL query to make.variables
- The variables in the GraphQL query.callback
- The callback for when the data is fetched.