FB.login(function(response) {
if (response.status === 'connected') {
$rootScope.getLoginFb(response);
} else if (response.status === 'not_authorized') {
// The person is logged into Facebook, but not your app.
} else {
// The person is not logged into Facebook, so we're not sure if
// they are logged into this app or not.
}
},{scope: 'publish_actions,email'});
FB.login(function(response) {
if (response.status === 'connected') {
$rootScope.getLoginFb(response);
} else if (response.status === 'not_authorized') {
// The person is logged into Facebook, but not your app.
} else {
// The person is not logged into Facebook, so we're not sure if
// they are logged into this app or not.
}
},{scope: 'publish_actions,email'});
$mysqli = new mysqli("localhost", "user", "password", "dbname"); //подключение
$mysqli ->query("SET NAMES 'utf8' "); //вся выборка будет в юникоде
$sql = 'SELECT wp_bp_xprofile_fields.name, wp_bp_xprofile_data.value, wp_bp_xprofile_data.user_id, wp_bp_xprofile_data.field_id FROM wp_bp_xprofile_data INNER JOIN wp_bp_xprofile_fields ON wp_bp_xprofile_data.field_id = wp_bp_xprofile_fields.id ORDER BY user_id, field_id';
$result = $mysqli ->query($sql); //запрос
//функция вывода информации из бд
function printResult($result){
echo "Количество записей: ". $result->num_rows ."<br>";
while(($row = $result->fetch_assoc()) != FALSE){
$u++;
echo $u."-й пользователь с ID: ". $row['user_id']."<br>";
}
}
printResult($result);