Subversion Repositories SmartDukaan

Rev

Rev 2580 | Rev 2649 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

window.fbAsyncInit = function() {
        FB.init({
                appId  : '209449825766256',     //'186498998073288',
                status : true, // check login status
                cookie : true, // enable cookies to allow the server to access the session
                xfbml  : true  // parse XFBML
        });
};

function publishStream()        {
        FB.ui({
                method: 'feed',
                name: "Android Festival on Saholic.com",
                link: "http://www.facebook.com/mysaholic?sk=app_209449825766256",
                picture: "http://74.207.248.175:8095/images/saholic-android.jpg",
                caption: 'Android Festival @ Saholic.com',
                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.',
                message: 'Massive Discounts on popular Android phones!'
        },
        function(response) {
                if (response && response.post_id) {
//                      showFriendSelector();
                } else {
                        // Post was not published
                }
        });
}

$(function(){
    var e = document.createElement('script');
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
    
    if (fbData.page.liked)      {
                $(".like").show();
        } else  {
                $(".unlike").show();
        }
        
        function showFriendSelector()   {
                FB.ui({
                        method: 'apprequests',
                        title: 'Invite Friends to Android Festival',
                        message: 'Android Festival on Saholic.com - Massive discounts on hot selling Android smart phones'
                });
        }
        
        $('#share').click(function(){
                publishStream();
        });
});