Location: PHPKode > projects > Teampopor > teampopor-0.5/teampopor/modules/network/profile.pages.inc
<?php
/**
 * page callback: network/%network/profile/%user/js/%
 */
function network_profile_js($network, $profile, $action) {
  switch ($action) {
    case 'follow':
      follow_save(NULL, array(
        'followee_uid' => $profile->uid,
      ));
      return json('SUCCESS');
    case 'unfollow':
      if ($follow = follow_load(array('followee_uid' => $profile->uid))) {
        follow_delete($follow);
      }
      return json('SUCCESS');
  }
}
Return current item: Teampopor