Find out what your friends are reading, log in with FB here
You are logged in as: ' + name + '
'); //$('You are logged in as: ' + name + '
').prependTo($('#fb_reader_content')); } }); } function fb_reader_bootstrap() { // code for load user settings var fb_reader_settings = getCookie(cookie_user_settings); if (fb_reader_settings != 0) {// By default enable auto post $('#ndtv_reader_status').attr('checked', true); save_user_settings('ndtv_reader_status'); } // Append to the parent div $('#loading_social_reader').remove(); $('#fb_reader_content').appendTo($('#fb_reader_container')); // Changes to FB reader strip if (check_fb_login_status()) { // If posted to FB if (!check_cookie_if_already_posted(fb_content_type, fb_identifier)) { setTimeout(function() { fb_reader_post_data(); }, 1000); } fb_reader_bootstrap_init(); } else { fb_reader_enable_onload_popup(); } $('#fb_reader_content').css('display', 'block'); } function fb_reader_bootstrap_init() { // Changes to FB reader strip if (check_fb_login_status()) { fb_reader_display_profile_data(); $('#fb_btn_login').css('display', 'none'); $('#fb_btn_loggedin').show('slows'); $('#fb_btn_loggedout').show('slows'); $('.fb_reader_get_started').css('display', 'none'); //enable the delete button if (!check_cookie_if_fb_content_deleted(fb_identifier)) { $('#fb_btn_remove').show('slow'); } } } function fb_reader_save_fb_content_id(identifier, fb_content_id) { var json_data = getCookie(cookie_user_posted); if(!json_data) { var fb_content_array = new Object(); fb_content_array[identifier.toString()] = fb_content_id; } else { var fb_content_array = JSON.parse(json_data); fb_content_array[identifier.toString()] = fb_content_id; } var json_text = JSON.stringify(fb_content_array); setCookie(cookie_user_posted, json_text, cookie_user_history_expiry_min, cookie_user_history_expiry_hour, cookie_user_history_expiry_days, cookie_path, cookie_domain, false); } function fb_reader_remove_fb_content(identifier) { var json_text = getCookie(cookie_user_posted); if (json_text) { var decoded_data = JSON.parse(json_text); var ids_val = decoded_data[identifier.toString()]; if (ids_val) { FB.api('/' + ids_val, 'delete', function(response) { if (!response || response.error) { } else { delete decoded_data[identifier.toString()]; var json_val = JSON.stringify(decoded_data); setCookie(cookie_user_posted, json_val, cookie_user_history_expiry_min, cookie_user_history_expiry_hour, cookie_user_history_expiry_days, cookie_path, cookie_domain, false); $('#fb_btn_remove').hide('slow'); fb_reader_display_message('2'); } }); } } } function check_cookie_if_fb_content_deleted(identifier) { var json_text = getCookie(cookie_user_posted); if (json_text) { var decoded_data = JSON.parse(json_text); var ids_val = decoded_data[identifier.toString()]; if (ids_val) { return false; } } return true; } function fb_reader_display_message(code) { var message = ''; var class_name = 'fb_reader_msg_green'; switch (code) { case '1': if(fb_content_type == 'article') { message = 'The article has been posted on your Facebook timeline'; } else if (fb_content_type == 'video') { message = 'The video has been posted on your Facebook timeline'; } else if (fb_content_type == 'photo') { message = 'The photo has been posted on your Facebook timeline'; } break; case '2': if(fb_content_type == 'article') { message = 'The article has been removed from your Facebook timeline'; } else if (fb_content_type == 'video') { message = 'The video has been removed from your Facebook timeline'; } else if (fb_content_type == 'photo') { message = 'The album has been removed from your Facebook timeline'; } class_name = 'fb_reader_msg_red'; break; case '3': if(fb_content_type == 'article') { message = 'Please activate your Facebook Timeline to share this article'; } else if (fb_content_type == 'video') { message = 'Please activate your Facebook Timeline to share this video'; } else if (fb_content_type == 'photo') { message = 'Please activate your Facebook Timeline to share this album'; } class_name = 'fb_reader_msg_orange'; break; default: message = 'There is some problem, please try after some time'; break; } $('#fb_reader_dynamic_msg').html('' + message + '
'); //$('' + message + '
').prependTo($('#fb_reader_content')); setTimeout(function() { $("#fb_reader_message_box").remove(); fb_reader_display_profile_data(); }, 5000); } function fb_reader_enable_onload_popup() { var user_cancelled_popup = getCookie(cookie_user_cancelled); if (user_cancelled_popup != 1) { fb_reader_cancelled(); fb_reader_info_popup(); } } // Onload window.fbAsyncInit = function() { FB.init({ appId : fb_reader_app_id, // App ID channelURL : '', // Channel File, not required so leave empty status : true, // check login status cookie : true, // enable cookies to allow the server to access the session oauth : true, // enable OAuth 2.0 xfbml : true // parse XFBML }); setTimeout("fb_reader_bootstrap()", 5000); //setTimeout("fb_reader_popup()", fb_reader_wait_time); // (Should appear only on first load and once in a week) };NDTV Correspondent | Updated: June 15, 2012 16:10 IST
').appendTo($('#gta')); $('').appendTo($('#gta')); },3000); /* s += ''; s += ''; */ } else if (google_ads.length > 1) { s += ''; } s += '' } } // document.write(s); return; } // --> google_ad_client = "pub-7641565019577886"; /* 468x60, created 3/6/09 */ google_ad_slot = "8438645248"; google_ad_width = 640; google_ad_height = 70; google_max_num_ads = 1; google_ad_type = 'text'; google_ad_output = 'js'; //-->arkansas football player dies anne mccaffrey anne mccaffrey amazon promotional code artificial christmas trees bean bag chairs android tablet
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.