Facebook Syndication

From KickApps Documentation

Jump to: navigation, search

In order to enable "Publish this activity to Facebook" checkboxes to allow all of your members' site activity to publish to their Facebook feeds, follow the following instructions:

The following code all goes in the footer section of your Global Page Template.

Basic Implementation

	<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
	<script type="text/javascript" src="/kickapps/js/facebookConnect.v2.js"></script>
	Ka.FacebookConnect.init({
		apiKey: '1234567890',
		buttonHtml: '<p><img src="http://static.ak.fbcdn.net/images/icons/favicon.gif" /> <input class="ka_fb_connect ka_button" type="checkbox" /> Publish this activity to Facebook</p>',
		autoChecked: true,
		autoScroll: true
	});

Disabling Features

	<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
	<script type="text/javascript" src="/kickapps/js/facebookConnect.v2.js"></script>

	Ka.events.listen('fbc-before-init', function(){
		var actions = Ka.Settings.FacebookConnect.actions;

		actions['media-blog-commenting'].enabled = false;
		actions['media-audio-commenting'].enabled = false;
		actions['media-photo-commenting'].enabled = false;
		actions['media-video-commenting'].enabled = false;
	});

	Ka.FacebookConnect.init({
		apiKey: '1234567890',
		buttonHtml: '<p><img src="http://static.ak.fbcdn.net/images/icons/favicon.gif" /> <input class="ka_fb_connect ka_button" type="checkbox" /> Publish this activity to Facebook</p>',
		autoChecked: true,
		autoScroll: true
	});

Changing Template Strings

	<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
	<script type="text/javascript" src="/kickapps/js/facebookConnect.v2.js"></script>

	Ka.events.listen('fbc-before-init', function(){
		var msg = Ka.Messages.FacebookConnect;
		msg.MEDIA_COMMENT_VIDEO_TITLE = "Check out the comments on this video...";
	});

	Ka.FacebookConnect.init({
		apiKey: '1234567890',
		buttonHtml: '<p><img src="http://static.ak.fbcdn.net/images/icons/favicon.gif" /> <input class="ka_fb_connect ka_button" type="checkbox" /> Publish this activity to Facebook</p>',
		autoChecked: true,
		autoScroll: true
	});