Subversion Repositories SmartDukaan

Rev

Rev 2649 | Rev 2923 | 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",
15
		picture: "http://74.207.248.175:8095/images/saholic-android.jpg",
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
    if (fbData.page)	{
36
        if (fbData.page.liked)	{
37
    		$(".like").show();
38
    	} else	{
39
    		$(".unlike").show();
40
    	}
41
    } else	{
42
    	window.top.location.href = 'http://www.facebook.com/mysaholic?sk=app_209449825766256';
43
    }
2580 varun.gupt 44
 
2653 varun.gupt 45
	$('#share').click(function(){
46
		publishStream();
47
	});
48
 
49
	$('#select-friends').click(function(){
2580 varun.gupt 50
		FB.ui({
51
			method: 'apprequests',
52
			title: 'Invite Friends to Android Festival',
2653 varun.gupt 53
			message: 'Check out Android Festival on Saholic.com - Massive discounts on hot selling Android smart phones'
2580 varun.gupt 54
		});
55
	});
56
});