http://www.facebook.com/feeds/share_posts.php?id=207302593&viewer=207302593&key=d95b2de790&format=rss20我在使用simplexml解析Facebook feed時遇到了問題
上面的鏈接是我在Facebook上共享帖子的URL。當我將該URL加載到simplexml_load_file()時,它提供了一整頁錯誤。看看這些錯誤,它看起來像Facebook正在吐出HTML而不是feed。我認爲這是一個身份驗證問題,但我註銷了Facebook並將供稿網址加載到我的瀏覽器中,我能夠看到供稿。這是我得到的錯誤。有任何想法嗎?謝謝!
A PHP Error was encountered
Severity: Warning
Message: simplexml_load_file() [function.simplexml-load-file]: http://www.facebook.com/feeds/share_posts.php?id=207302593&viewer=207302593&key=d95b2de790&format=rss20:12: parser error : AttValue: " or ' expected
Filename: models/Stream.php
Line Number: 55
A PHP Error was encountered
Severity: Warning
Message: simplexml_load_file() [function.simplexml-load-file]: </script><noscript> <meta http-equiv=refresh content="0; URL=?_fb_noscript=1" />
...
的作品就像一個魅力!不能相信這是一個不常見的問題o.O – yoshi 2012-01-19 15:20:08