1
$args = array(
'access_token' => 'xxxxxxx'
);
$url = "https://graph.facebook.com/me/friends";
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
curl_exec($ch);
curl_close($ch);
這是我的代碼以獲得我的朋友 以下是預期產出。我將在哪裏得到所有我的朋友姓名和身份證。使用cURL獲取數據
{
"data": [
{
"name": "xxxx",
"id": "xxxx"
},
{
"name": "xxxx",
"id": "xxxx"
},
但它給錯誤。
{"error":{"message":"(#100) ","type":"OAuthException","code":100}}
我不想讓我的朋友通過SDK,但accesstoken – user1863472