 |
★ ใช้ TOKEN ของ FACEBOOK เรียกข้อมูลผู้ใช้ พวก ชื่อ , วันเกิด,อีเมล,รูป ออกมาเเสดงเป็น PHP อ่ะครับผม |
|
 |
|
|
 |
 |
|
ผมทำดึงรูปได้เเล้ว หละครับ
graph.facebook.com/DDDxxxIDxxxDDD/picture?type=square
ผมก็พยายามเหมือนกันนะครับไม่ใช้รอเเต่คำตอบ เเต่มันยังไม่ได้ซักที
-........-
อยากให้ดึงพวก ID ชื่อ อะไรพวกนี้โดยใช้ TOKEN FACEBOOK อ่ะครับ
เอาออกมาเเสดงใน PHP
|
 |
 |
 |
 |
Date :
2013-09-26 23:09:30 |
By :
aibot |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

ผมไม่รู้จะดึงมาใน PHP ยังไง (วิธีที่เค้าใช้กันอ่ะครับ ส่วนใหญ่)
|
 |
 |
 |
 |
Date :
2013-09-26 23:49:00 |
By :
aibot |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ยังไงหรอครับ ไม่เข้าใจไม่เคยใช้
|
 |
 |
 |
 |
Date :
2013-09-27 01:11:19 |
By :
aibot |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เนี้ยสมุติผมเรียน id ออกมา เเล้วนะ
http://graph.facebook.com/kan.wongsawan?fields=address
เเล้วทำยังไงต่อหรอครับผม
|
 |
 |
 |
 |
Date :
2013-09-27 01:15:30 |
By :
aibot |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
++++
|
 |
 |
 |
 |
Date :
2013-09-27 08:55:35 |
By :
aibot |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
+++
|
 |
 |
 |
 |
Date :
2013-09-27 16:40:55 |
By :
aibot |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
function curl_get_contents($url) { // from http://www.fusionswift.com/2010/02/curl-vs-file_get_contents/
// Initiate the curl session
$ch = curl_init();
// Set the URL
curl_setopt($ch, CURLOPT_URL, $url);
// Removes the headers from the output
curl_setopt($ch, CURLOPT_HEADER, 0);
// Return the output instead of displaying it directly
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Execute the curl session
$output = curl_exec($ch);
// Close the curl session
curl_close($ch);
// Return the output as a variable
return $output;
}
$fb_user = json_decode(curl_get_contents("https://graph.facebook.com/DDDxxxIDxxxDDD/picture?type=square"),TRUE);
var_dump($fb_user);
|
ประวัติการแก้ไข 2013-09-27 23:11:32
 |
 |
 |
 |
Date :
2013-09-27 20:10:51 |
By :
itpcc |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มันเป็นแบบนี้อ่ะครับ
http://moip.tk/mo.php
ใส่ไปแบบนี้

|
 |
 |
 |
 |
Date :
2013-09-27 21:58:33 |
By :
aibot |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
โทษครับลืม ตอนนี้ใส่ผมละ มันขึ้น
Fatal error: Call to undefined function curl_get_content() in /home/mothz/domains/moip.tk/public_html/mo.php on line 19
Code (PHP)
<?php
function curl_get_contents($url) { // from http://www.fusionswift.com/2010/02/curl-vs-file_get_contents/
// Initiate the curl session
$ch = curl_init();
// Set the URL
curl_setopt($ch, CURLOPT_URL, $url);
// Removes the headers from the output
curl_setopt($ch, CURLOPT_HEADER, 0);
// Return the output instead of displaying it directly
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Execute the curl session
$output = curl_exec($ch);
// Close the curl session
curl_close($ch);
// Return the output as a variable
return $output;
}
$fb_user = json_decode(curl_get_content("https://graph.facebook.com/mothzip/picture?type=square"),TRUE);
var_dump($fb_user);
?>
|
ประวัติการแก้ไข 2013-09-27 23:11:18
 |
 |
 |
 |
Date :
2013-09-27 23:09:49 |
By :
aibot |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
$fb_user = json_decode(curl_get_content("https://graph.facebook.com/DDDxxxIDxxxDDD/picture?type=square"),TRUE);
แก้เป็น
Code (PHP)
$fb_user = json_decode(curl_get_contents("https://graph.facebook.com/DDDxxxIDxxxDDD/picture?type=square"),TRUE);
|
 |
 |
 |
 |
Date :
2013-09-27 23:11:58 |
By :
itpcc |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
http://moip.tk/mo.php
ขึ้นมา NULL แล้วครับผม
เอ่อ เเล้วจะดึงพวกชื่อหละครับ เเล้ว NULL มันคือะไร อธิบายให้หน่อยครับ
https://graph.facebook.com/kan.wongsawan
ขอโทษครับที่รบกวนเเต่ไม่มีใครให้รบกวนเเล้วจริงๆ T T
|
ประวัติการแก้ไข 2013-09-28 00:35:47
 |
 |
 |
 |
Date :
2013-09-27 23:20:59 |
By :
aibot |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
++
|
 |
 |
 |
 |
Date :
2013-09-28 11:21:44 |
By :
aibot |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|