Subversion Repositories SmartDukaan

Rev

Rev 2580 | Rev 2647 | 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({
2582 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
 
35
    if (fbData.page.liked)	{
36
		$(".like").show();
37
	} else	{
38
		$(".unlike").show();
39
	}
40
 
41
	function showFriendSelector()	{
42
		FB.ui({
43
			method: 'apprequests',
44
			title: 'Invite Friends to Android Festival',
45
			message: 'Android Festival on Saholic.com - Massive discounts on hot selling Android smart phones'
46
		});
47
	}
48
 
49
	$('#share').click(function(){
50
		publishStream();
51
	});
52
});