If you think the Android project BagOfPix listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/**
* Copyright 2010-present Facebook./*fromwww.java2s.com*/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/package com.facebook.internal;
import com.facebook.Settings;
import com.facebook.internal.Utility;
import java.util.Collection;
/**
* com.facebook.internal is solely for the use of other packages within the Facebook SDK for Android. Use of
* any of the classes in this package is unsupported, and they may be modified or removed without warning at
* any time.
*/publicfinalclass ServerProtocol {
privatestaticfinal String DIALOG_AUTHORITY_FORMAT = "m.%s";
publicstaticfinal String DIALOG_PATH = "dialog/";
publicstaticfinal String DIALOG_PARAM_SCOPE = "scope";
publicstaticfinal String DIALOG_PARAM_CLIENT_ID = "client_id";
publicstaticfinal String DIALOG_PARAM_DISPLAY = "display";
publicstaticfinal String DIALOG_PARAM_REDIRECT_URI = "redirect_uri";
publicstaticfinal String DIALOG_PARAM_TYPE = "type";
publicstaticfinal String DIALOG_PARAM_ACCESS_TOKEN = "access_token";
publicstaticfinal String DIALOG_PARAM_APP_ID = "app_id";
publicstaticfinal String DIALOG_PARAM_E2E = "e2e";
// URL components
privatestaticfinal String GRAPH_URL_FORMAT = "https://graph.%s";
privatestaticfinal String REST_URL_FORMAT = "https://api.%s/method";
publicstaticfinal String BATCHED_REST_METHOD_URL_BASE = "method/";
publicstaticfinal Collection<String> errorsProxyAuthDisabled =
Utility.unmodifiableCollection("service_disabled", "AndroidAuthKillSwitchException");
publicstaticfinal Collection<String> errorsUserCanceled =
Utility.unmodifiableCollection("access_denied", "OAuthAccessDeniedException");
publicstaticfinal String getDialogAuthority() {
return String.format(DIALOG_AUTHORITY_FORMAT, Settings.getFacebookDomain());
}
publicstaticfinal String getGraphUrlBase() {
return String.format(GRAPH_URL_FORMAT, Settings.getFacebookDomain());
}
publicstaticfinal String getRestUrlBase() {
return String.format(REST_URL_FORMAT, Settings.getFacebookDomain());
}
}