Referencing $bp from another site

We are creating WP users from a CodeIgniter membership management system and would like to populate and update a few bp profile fields at the same time.

Have found these functions;-

xprofile_set_field_data

xprofile_get_field_data

Looking promising so far.

Have got stuck thus far:-

$wppath = $this->config->item('wppath');

require($wppath.'wp-blog-header.php');

require($wppath.'wp-content/plugins/buddypress/bp-loader.php');

global $bp;

$profile_data = get_all_for_user((int)2);

Which gives:-

Call to undefined function get_all_for_user()

can anyone help please?