Function.prototype.bind = function(context, ...args) {
let object = {...context};
let symbol = Symbol('target');
object[symbol] = this;
return function(...rest) {
return object[symbol](...args, ...rest);
};
};
postHTTP(url, info) {
return new Promise((resolve, reject) => {
this.http.post(url, info, httpOptions).subscribe((data) => {
resolve(data);
console.log("POST Request is successful ", data);
}, (error) => {
reject(error);
console.log("Error", error);
});
});
}
user_ids
и с нужными вам fields
, напримерuser_ids=1&fields=photo_max
user_ids
вообще $country = $user_info->response[0]->country->title;
$city = $user_info->response[0]->city->title;
v=5.92
{
"response": {
"count": 3,
"items": [5485951, 84317567, 997521]
}
}
count
— количество друзей VK.callMethod()
, нужно подключать JavaScript SDK, а не Open API