chrishide87 Posted September 6, 2007 Share Posted September 6, 2007 i'm trying to create an rss reader application for facebook using the tutorial at http://www.howtoforge.com/rss_facebook_app_php i followed it directly but get an error when i go onto the page <?php define('MAGPIE_CACHE_DIR', './magpie_cache'); define('MAGPIE_CACHE_ON', 1); define('MAGPIE_CACHE_AGE', 600); require_once('appinclude.php'); require_once('rss/rss_fetch.inc'); $rss = @fetch_rss('http://www.pushbikearmy.co.uk/main/index.php/feed/'); $fbml = '<div style="margin:0 10px 0 10px;">'; $fbml .= '<table border="0" width="100%" style="margin: 5px 5px 5px 5px;"><tr><td valign="top" width="80%"><a href="'.$rss->channel['link'].'" style="font-weight: bold;">'.$rss->channel['title'].'</a></td><td valign="top" width="80%"><fb:share-button class="meta"> <meta name="medium" content="blog"/> <meta name="title" content="'.htmlspecialchars(strip_tags($rss->channel['title'])).'"/> <meta name="description" content="'.htmlspecialchars(strip_tags($rss->channel['description'])).'"/> <link rel="target_url" href="'.$rss->channel['link'].'"/> </fb:share-button></td></tr></table>'; foreach ($rss->items as $item) { $fbml .= '<div style="border-bottom: 2px solid #CCCCCC; padding-bottom:5px;"><br><div style="border-bottom: 1px dotted #CCCCCC; border-top: 1px dotted #CCCCCC;"><table border="0" width="100%" style="margin: 5px 5px 5px 5px;"><tr><td valign="top" width="80%"><a href="'.$item['link'].'" style="font-weight: bold;">'.$item['title'].'</a></td><td valign="top" width="80%"><fb:share-button class="meta"> <meta name="medium" content="blog" /> <meta name="title" content="'.htmlspecialchars(strip_tags($item['title'])).'" /> <meta name="description" content="'.htmlspecialchars(strip_tags($item['description'])).'" /> <link rel="target_url" href="'.$item['link'].'" /> </fb:share-button></td></tr></table></div>'; if($item['description']) $fbml .= $item['description']; $fbml .= '</div>'; } $fbml .= '</div>'; $facebook->api_client->profile_setFBML($fbml, $user); echo $fbml; ?> the error i get is this Warning: Invalid argument supplied for foreach() in /www/110mb.com/c/h/r/i/s/t/o/p/christopherhide/htdocs/rssreader/index.php on line 20 any help would be greatly appreciated... thanks chris Link to comment https://forums.phpfreaks.com/topic/68282-facebook-app-rss-reader/ Share on other sites More sharing options...
Jessica Posted September 6, 2007 Share Posted September 6, 2007 Remove the @s from the code, and you will see better errors. Link to comment https://forums.phpfreaks.com/topic/68282-facebook-app-rss-reader/#findComment-343304 Share on other sites More sharing options...
chrishide87 Posted September 6, 2007 Author Share Posted September 6, 2007 done that now the errors i get are... Warning: MagpieRSS: Failed to fetch http://www.pushbikearmy.co.uk/main/index.php/feed/ (HTTP Error: connection failed () in /www/110mb.com/c/h/r/i/s/t/o/p/christopherhide/htdocs/rssreader/rss/rss_fetch.inc on line 238 Warning: Invalid argument supplied for foreach() in /www/110mb.com/c/h/r/i/s/t/o/p/christopherhide/htdocs/rssreader/index.php on line 20 any ideas? Link to comment https://forums.phpfreaks.com/topic/68282-facebook-app-rss-reader/#findComment-343313 Share on other sites More sharing options...
chrishide87 Posted September 10, 2007 Author Share Posted September 10, 2007 please help i'm really struggling with this.. anyone? Link to comment https://forums.phpfreaks.com/topic/68282-facebook-app-rss-reader/#findComment-345270 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.