Subversion Repositories SmartDukaan

Rev

Rev 2939 | Rev 2953 | 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
 
2941 varun.gupt 29
function tellAFriend(id, name, price)	{
30
 
31
}
32
 
2580 varun.gupt 33
$(function(){
34
    var e = document.createElement('script');
35
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
36
    e.async = true;
37
    document.getElementById('fb-root').appendChild(e);
38
 
2653 varun.gupt 39
	$('#share').click(function(){
40
		publishStream();
41
	});
42
 
43
	$('#select-friends').click(function(){
2580 varun.gupt 44
		FB.ui({
45
			method: 'apprequests',
46
			title: 'Invite Friends to Android Festival',
2653 varun.gupt 47
			message: 'Check out Android Festival on Saholic.com - Massive discounts on hot selling Android smart phones'
2580 varun.gupt 48
		});
49
	});
2939 varun.gupt 50
 
51
	$('.link-coupon').click(function(){
2941 varun.gupt 52
		$(this).hide().siblings('span.coupon').show();
2939 varun.gupt 53
	});
2580 varun.gupt 54
});