当前位置: 首页>>代码示例>>Java>>正文


Java FacebookSdk.setApplicationId方法代码示例

本文整理汇总了Java中com.facebook.FacebookSdk.setApplicationId方法的典型用法代码示例。如果您正苦于以下问题:Java FacebookSdk.setApplicationId方法的具体用法?Java FacebookSdk.setApplicationId怎么用?Java FacebookSdk.setApplicationId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.facebook.FacebookSdk的用法示例。


在下文中一共展示了FacebookSdk.setApplicationId方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initGlobalObjects

import com.facebook.FacebookSdk; //导入方法依赖的package包/类
private static void initGlobalObjects(Context context, Options options) {
	GlobalObjectRegistry.addObject(OpenHelperManager.getHelper(context, DatabaseHelper.class));
	Gson gson = new GsonBuilder()
		.setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE)
		.create();
	GlobalObjectRegistry.addObject(gson);
	ImageLoader.init(context);
	EmbeddedSocialServiceProvider serviceProvider = new EmbeddedSocialServiceProvider(context);
	GlobalObjectRegistry.addObject(EmbeddedSocialServiceProvider.class, serviceProvider);
	GlobalObjectRegistry.addObject(new Preferences(context));
	GlobalObjectRegistry.addObject(new RequestInfoProvider(context));
	GlobalObjectRegistry.addObject(new UserAccount(context));
	GlobalObjectRegistry.addObject(new NotificationController(context));
	NetworkAvailability networkAccessibility = new NetworkAvailability();
	networkAccessibility.startMonitoring(context);
	GlobalObjectRegistry.addObject(networkAccessibility);
	FacebookSdk.sdkInitialize(context);
	FacebookSdk.setApplicationId(options.getFacebookApplicationId());
}
 
开发者ID:Microsoft,项目名称:EmbeddedSocial-Android-SDK,代码行数:20,代码来源:EmbeddedSocial.java

示例2: initFBSdk

import com.facebook.FacebookSdk; //导入方法依赖的package包/类
private void initFBSdk() {
    if (!FacebookSdk.isInitialized()) {
        FacebookSdk.setApplicationId(ApiObjects.facebook.get("app_id"));
        FacebookSdk.sdkInitialize(getActivity().getApplicationContext());
    }
    callbackManager = CallbackManager.Factory.create();

    profileTracker = new ProfileTracker() {
        @Override
        protected void onCurrentProfileChanged(Profile oldProfile, Profile currentProfile) {
            if (eventHandler != null) {
                if (currentProfile != null)
                    eventHandler.onFacebookLoggedIn();
            }
        }
    };
}
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:18,代码来源:FacebookShield.java

示例3: init

import com.facebook.FacebookSdk; //导入方法依赖的package包/类
public void init (String p_appID) {
	APP_ID = p_appID;

	FacebookSdk.sdkInitialize(activity);
	FacebookSdk.setApplicationId(APP_ID);

	initCallbacks();

	AppEventsLogger.activateApp(activity);
	Utils.callScriptFunc("initialized", "true");
	Utils.d("Facebook:Initialized");

	onStart();
}
 
开发者ID:FrogSquare,项目名称:GDFacebook,代码行数:15,代码来源:FacebookSDK.java

示例4: onCreate

import com.facebook.FacebookSdk; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    Timber.plant(new Timber.DebugTree());
    FirebaseApp.initializeApp(this);
    FacebookSdk.setApplicationId(getString(R.string.facebook_app_id));
    FacebookSdk.sdkInitialize(this);
    instance = this;
    database = FirebaseDatabase.getInstance();

    startService(CommentTableService.createIntent(this));

}
 
开发者ID:NarendraSickarwar,项目名称:FirebasePost,代码行数:14,代码来源:AgroStarApplication.java

示例5: initFacebook

import com.facebook.FacebookSdk; //导入方法依赖的package包/类
private void initFacebook() {
    FacebookSdk.setApplicationId(Config.FACEBOOK_APP_ID);

    AccessTokenTracker accessTokenTracker = new AccessTokenTracker() {
        @Override
        protected void onCurrentAccessTokenChanged(AccessToken oldAccessToken, AccessToken newAccessToken) {
            Logger.printInfo(LOG_TAG, "Is loged in with facebook");
        }
    };
    accessTokenTracker.startTracking();
}
 
开发者ID:KKorvin,项目名称:uPods-android,代码行数:12,代码来源:LoginMaster.java

示例6: onCreate

import com.facebook.FacebookSdk; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    context = this;
    applicationComponent = DaggerApplicationComponent.create();
    //TODO uncomment when production ready
    // if (!BuildConfig.DEBUG) {
    TwitterAuthConfig authConfig = new TwitterAuthConfig(BuildConfig.TWITTER_ID, BuildConfig.TWITTER_SECRET);
    Fabric.with(this, new Crashlytics(), new Twitter(authConfig));
    FacebookSdk.setApplicationId(BuildConfig.FB_ID);
    FacebookSdk.sdkInitialize(this);
    // }
}
 
开发者ID:belatrix,项目名称:AndroidAllStars,代码行数:14,代码来源:BelatrixConnectApplication.java

示例7: initLogin

import com.facebook.FacebookSdk; //导入方法依赖的package包/类
public void initLogin(final Activity activity) {
    callbackManager = CallbackManager.Factory.create();
    Config.debug("login");
    FacebookSdk.sdkInitialize(activity);
    FacebookSdk.setApplicationId(facebookApplicationId);
    LoginManager.getInstance().logInWithReadPermissions(activity, Arrays.asList("public_profile", "email"));
    LoginManager.getInstance().registerCallback(callbackManager,
            new FacebookCallback<LoginResult>() {
                @Override
                public void onSuccess(final LoginResult loginResult) {
                    // App code
                    ServerRequest.dismissProgressBar();
                    getFacebookData(loginResult.getAccessToken(),activity);
                    Config.debug("onSuccess", loginResult.toString());
                }

                @Override
                public void onCancel() {
                    // App code
                    ServerRequest.dismissProgressBar();
                    Config.debug("onCancel");
                    activity.finish();
                }

                @Override
                public void onError(FacebookException exception) {
                    // App code
                    ServerRequest.dismissProgressBar();
                    exception.printStackTrace();
                    activity.finish();
                }
            });
}
 
开发者ID:nishant-git,项目名称:social-api,代码行数:34,代码来源:FacebookService.java

示例8: initializeFacebookSDK

import com.facebook.FacebookSdk; //导入方法依赖的package包/类
private static void initializeFacebookSDK(FacebookConfig config) {
    FacebookSdk.setApplicationId(config.getApplicationId());
    FacebookSdk.sdkInitialize(mContext);
}
 
开发者ID:WindSekirun,项目名称:SocialLogin,代码行数:5,代码来源:SocialLogin.java


注:本文中的com.facebook.FacebookSdk.setApplicationId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。