Subversion Repositories SmartDukaan

Rev

Rev 2923 | Rev 2941 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2580 varun.gupt 1
window.fbAsyncInit = function() {
2
	FB.init({
2653 varun.gupt 3
		appId  : '209449825766256',	// 186498998073288
2580 varun.gupt 4
		status : true, // check login status
5
		cookie : true, // enable cookies to allow the server to access the session
6
		xfbml  : true  // parse XFBML
7
	});
8
};
9
 
10
function publishStream()	{
11
	FB.ui({
12
		method: 'feed',
13
		name: "Android Festival on Saholic.com",
14
		link: "http://www.facebook.com/mysaholic?sk=app_209449825766256",
2923 varun.gupt 15
		picture: "http://social.shop2020.in:8080/Social/images/saholic-android.jpg",
2580 varun.gupt 16
		caption: 'Android Festival @ Saholic.com',
17
		description: 'Saholic.com is offering huge discounts, upto Rs.1500, on a whole range of popular Android handsets starting from Rs.5,000 to Rs.30,000 including Samsung Galaxy S II and many more.',
18
		message: 'Massive Discounts on popular Android phones!'
19
	},
20
	function(response) {
21
		if (response && response.post_id) {
22
//			showFriendSelector();
23
		} else {
24
			// Post was not published
25
		}
26
	});
27
}
28
 
29
$(function(){
30
    var e = document.createElement('script');
31
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
32
    e.async = true;
33
    document.getElementById('fb-root').appendChild(e);
34
 
2653 varun.gupt 35
	$('#share').click(function(){
36
		publishStream();
37
	});
38
 
39
	$('#select-friends').click(function(){
2580 varun.gupt 40
		FB.ui({
41
			method: 'apprequests',
42
			title: 'Invite Friends to Android Festival',
2653 varun.gupt 43
			message: 'Check out Android Festival on Saholic.com - Massive discounts on hot selling Android smart phones'
2580 varun.gupt 44
		});
45
	});
2939 varun.gupt 46
 
47
	$('.link-coupon').click(function(){
48
		console.log('clicked');
49
		$(this).hide()
50
			.siblings('span.coupon').show();
51
	});
2580 varun.gupt 52
});