Exemplo n.º 1
0
 public static function run_cron()
 {
     if (module_social::is_plugin_enabled() && self::is_plugin_enabled()) {
         $accounts = self::get_accounts();
         foreach ($accounts as $account) {
             $facebook_account = new ucm_facebook_account($account['social_facebook_id']);
             /* @var $pages ucm_facebook_page[] */
             $pages = $facebook_account->get('pages');
             foreach ($pages as $page) {
                 ob_start();
                 $page->graph_load_latest_page_data();
                 $output = ob_get_clean();
                 if (module_config::c('debug_cron_jobs', 0)) {
                     echo $output;
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
 public static function run_cron()
 {
     if (module_social::is_plugin_enabled() && self::is_plugin_enabled()) {
         $accounts = self::get_accounts();
         foreach ($accounts as $account) {
             $twitter_account = new ucm_twitter_account($account['social_twitter_id']);
             $twitter_account->import_data(module_config::c('debug_cron_jobs', 0));
         }
     }
 }