Drupal 7 module issues using node_ functions
Never ever call functions from the global scope. You are probably running into a situation where other modules (the node module) are not yet loaded.

&lt;?php
if(isset($_GET['fetch']))
{
    social_fetch();
}


You could try to add your function to hook_boot(), but even then the node module might not be loaded, so you will have to ensure it is loaded manually.   drupal_load('module', 'node');

You'll end up with

function social_fetch_boot() {
  if(isset($_GET['fetch'])) {
    drupal_load('module', 'node');
    social_fetch();
  }
}