Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 1st December 2008, 18:12
pclark pclark is offline
Junior Member
Join Date: Dec 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with your FaceBook Tutorial

Firstly, great tutorial!
I'm trying to make it display only the 5 most recent entries in my facebook application. I've tried doing what the Magpie RSS howto says, but it says:
Warning: Invalid argument supplied for foreach() in /usr/home/omgponi/public_html/fb/simplyhappynews/rss.php on line 21
my application code is as follows (Line 9 is the custom code, and I've renamed subsequent variables to use the new array, no dice.):
PHP Code:

$rss = @fetch_rss($feed);
$rssitems array_slice($rss->items05);

$fbml '<fb:header decoration="no_padding">Simply Happy News</fb:header><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="'.$rssitems->channel['link'].'" style="font-weight: bold;">'.$rssitems->channel['title'].'</a></td><td valign="top" width="80%"><fb:share-button class="meta">
  <meta name="medium" content="blog"/>
  <meta name="title" content="'
  <meta name="description" content="'
  <link rel="target_url" href="'

foreach (
$rssitems->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'].'" />
$item['description']) $fbml .= $item['description'];
$fbml .= '</div>';
$fbml .= '</div>';



Any ideas? Its really frustrating
Reply With Quote
Sponsored Links


application, facebook, php

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange email problem for one of my domains... any help appreciated paulrobert_a Installation/Configuration 5 9th August 2010 15:15
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 13:20
bind9 configuration problem Bakty1975 Server Operation 6 11th August 2008 15:04
No delivery and log warnings after postfix/mysql tutorial TWadmin HOWTO-Related Questions 7 27th December 2006 23:24
SMTP TLS Problem with Mail Client dschmid Installation/Configuration 1 9th December 2005 02:56

All times are GMT +2. The time now is 23:24.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.