 |
|
Twitter API แบบเดิม
//ฟังก์ชั่นเรียก Timelines
function twitterTimeline() {
// Set your username and password here
$user = "UserName Twitter ของคุณ";
$password = "Password Twitter ของคุณ";
$timeline =
curl_init("https://twitter.com/statuses/user_timeline.xml");
curl_setopt($timeline, CURLOPT_HEADER, 1);
curl_setopt($timeline,CURLOPT_TIMEOUT, 30);
curl_setopt($timeline,CURLOPT_USERPWD,$user . ":" . $password);
curl_setopt($timeline,CURLOPT_RETURNTRANSFER,1);
curl_setopt ($timeline, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($timeline, CURLOPT_SSL_VERIFYHOST, 0);
$result=curl_exec ($timeline);
$data = strstr($result, '
ปัจจุบันแบบนี้ใช้งานไม่ได้แล้ว ซึ่ง ตัว twitter ปรับมาใช้ Oauth

ซึ่งจากที่ศึกษามาซักระยะผมเขียน
Twitter API Oauth Update Status(ส่งข้อความ update status ผ่านเว็บ) แล้ว
พอจะให้ข้อความอันไหน เผยแพร่จะต้อง ใส่ code ทุกๆครั้งโดยระบบจะ ใฟ้ allow ก่อน

ที่ต้องการคืออยากให้มันจำค่าแล้วเก็บใช้งานตลอดสำหรับค่า appication ที่เราทำไว้ ไม่รู้ใครพอจะแนะนำได้บ้าง?
Tag : PHP, JavaScript
|
|
 |
 |
 |
 |
Date :
2010-10-19 11:52:17 |
By :
itmoamun |
View :
1382 |
Reply :
0 |
|
 |
 |
 |
 |
|
|
|
 |