0
다음 코드는 xml 피드를 Twitter에서 가져 와서 결과를 표시합니다.Twitter에서 PHP XML 피드 사용
<?php
$xml = simplexml_load_file('https://api.twitter.com/1/statuses/user_timeline/QuiteCheesedOff.xml?count=6');
$tweets = $xml->xpath("/statuses/status");
foreach($tweets as $tweet) {
$text = $tweet->text;
$date = $tweet->created_at;
echo '<div>' . $text . '</div>' . '<b>' . $date . '</b>';
}
?>
대신이 값을 반환합니다.
경고 : 스트림을 열지 못했습니다 : 은 [function.simplexml-로드 파일] simplexml_load_file (https://api.twitter.com/1/statuses/user_timeline/QuiteCheesedOff.xml?count=6) : HTTP 요청 실패! 라인 /home/divethe1/public_html/robin-knight.com/wp-content/themes/RIKsoft/index.php 에서 HTTP/1.0 400 잘못된 요청 (142)
는 속도 제한과 관련 될 수있다 : https://dev.twitter.com/docs/rate-limiting –
IT는 IT가 알 수없는 이유로 다시 작동하지 않습니다 알 수없는 이유로 –
지금 일하고있어 –