nxs_rePostToFB_ajax

The NextScripts: Social Networks Auto-Poster nxs rePostToFB ajax function.

Description

nxs_rePostToFB_ajax(); 

Usage

  1. if ( !function_exists( 'nxs_rePostToFB_ajax' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextscripts-social-networks-auto-poster/inc-cl/fb.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = nxs_rePostToFB_ajax(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc-cl/fb.php  
  1. if (!function_exists("nxs_rePostToFB_ajax")) { function nxs_rePostToFB_ajax() { check_ajax_referer('nxsSsPageWPN'); $postID = $_POST['id']; // $result = nsPublishTo($id, 'FB', true);  
  2. $options = get_option('NS_SNAutoPoster'); foreach ($options['fb'] as $ii=>$fbo) if ($ii==$_POST['nid']) { $fbo['ii'] = $ii; $fbo['pType'] = 'aj'; 
  3. $fbpo = get_post_meta($postID, 'snapFB', true); /** echo $postID."|"; echo $fbpo; */ $fbpo = maybe_unserialize($fbpo); //prr($fbpo);  
  4. if (is_array($fbpo) && isset($fbpo[$ii]) && is_array($fbpo[$ii]) ) { $ntClInst = new nxs_snapClassFB(); $fbo = $ntClInst->adjMetaOpt($fbo, $fbpo[$ii]); } //prr($fbo); 
  5. if (isset($_POST['ri']) && $_POST['ri']=='1') { nxs_getBackFBComments($postID, $fbo, $fbpo[$ii]); die(); } else { 
  6. $result = nxs_doPublishToFB($postID, $fbo); if ($result == '200') die("Your post has been successfully sent to Facebook."); else die($result); 
  7. }