Jump to content

Rss feed connected to facebook?


Recommended Posts

  • 3 weeks later...
Search RSS on facebook app page ... and there are alot of apps you can install to your facebook page so it will read the RSS of any feed you give ..


Yes I know this but all of them that I checked do not update the RSS feed on the WALL, I want it on the WALL not an own section that is called RSS.

Any idea?
Link to comment
Share on other sites

  • 2 months later...

I have the same answer like you I use RSS graffiti
I set the feed URL to my website example http://www.jolieetjulian.com/modules/feeder/rss.php?id_category=0&orderby=position&orderway=ASC
When I fetch and preview I saw my feed but that not update my wall

RSS graffiti show me some errors the same every time "Missing publication date in 10 items in your feed."

What should I do ?

Link to comment
Share on other sites

  • 4 weeks later...

same problem with pubDate and time format... it posts as it was at midnight 00:00:00
and rss graffiti doesn't work...
example of output:


<![CDATA[ 2011-06-13 00:00:00 ]]>



my whole code:

include(dirname(__FILE__).'/../../config/config.inc.php');
require_once(dirname(__FILE__).'/../../init.php');

// Get data
$number = ((int)(Tools::getValue('n')) ? (int)(Tools::getValue('n')) : 10);
$orderByValues = array(0 => 'date_add', 1 => 'price', 2 => 'name', 3 => 'date_upd', 4 => 'position');
$orderWayValues = array(0 => 'DESC', 1 => 'ASC');
$orderBy = Tools::strtolower(Tools::getValue('orderby', $orderByValues[(int)(Configuration::get('PS_PRODUCTS_ORDER_BY'))]));
$orderWay = Tools::strtoupper(Tools::getValue('orderway', $orderWayValues[(int)(Configuration::get('PS_PRODUCTS_ORDER_WAY'))]));
if (!in_array($orderBy, $orderByValues))
   $orderBy = $orderByValues[0];
if (!in_array($orderWay, $orderWayValues))
   $orderWay = $orderWayValues[0];
$id_category = ((int)(Tools::getValue('id_category')) ? (int)(Tools::getValue('id_category')) : 1);
$products = Product::getNewProducts(intval($cookie->id_lang), 0, 10, false, 'date_add', 'DESC');
$currency = new Currency((int)($cookie->id_currency));
$affiliate = (Tools::getValue('ac') ? '?ac='.(int)(Tools::getValue('ac')) : '');

// Send feed
header("Content-Type:text/xml; charset=utf-8");
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
?>


       <title><![CDATA[<?php echo Configuration::get('PS_SHOP_NAME') ?>]]></title>
       <link><?php echo _PS_BASE_URL_.__PS_BASE_URI__; ?></link>
<?php echo Configuration::get('PS_SHOP_EMAIL') ?>
PrestaShop
<?php echo Language::getIsoById((int)($cookie->id_lang)); ?>

           <title><![CDATA[<?php echo Configuration::get('PS_SHOP_NAME') ?>]]></title>
<?php echo _PS_BASE_URL_.__PS_BASE_URI__.'img/logo.jpg'; ?>
           <link><?php echo _PS_BASE_URL_.__PS_BASE_URI__; ?></link>
           <?php $now = date("D, d M Y H:i:s O");?>

<?php echo $now; ?>
<?php
   foreach ($products AS $product)
   {
       $image = Image::getImages((int)($cookie->id_lang), $product['id_product']);
       echo "\t\t\n";
       echo "\t\t\t<title><![CDATA[".$product['name']." - ".html_entity_decode(Tools::displayPrice(Product::getPriceStatic($product['id_product']), $currency), ENT_COMPAT, 'UTF-8')." ]]></title>\n";
       echo "\t\t\t<![CDATA[".$date_format['%a, %b %d %H:%i:%S %Y GMT'].$product['date_add']." ]]>\n";
       echo "\t\t\t";
       $cdata = true;
       if (is_array($image) AND sizeof($image))
       {
           echo "<![CDATA[";
           $cdata = false;
       }
       if ($cdata)
           echo "<![CDATA[";
       echo $product['description_short']."]]>\n";

       echo "\t\t\t<link><![CDATA[".htmlspecialchars($link->getproductLink($product['id_product'], $product['link_rewrite'], Category::getLinkRewrite((int)($product['id_category_default']), $cookie->id_lang))).$affiliate."]]></link>\n";
       echo "\t\t\n";
   }
?>




what's wrong?! Thanks!

Link to comment
Share on other sites

  • 2 months later...

this code works for me:

 

$image = Image::getImages((int)($cookie->id_lang), $product['id_product']);
 echo "\t\t<item>\n";
 echo "\t\t\t<title><![CDATA[".$product['name']." - ".html_entity_decode(Tools::displayPrice(Product::getPriceStatic($product['id_product']), $currency), ENT_COMPAT, 'UTF-8')." ]]></title>\n";
//begin of custom code
echo "t\t\t<pubDate><![CDATA[".$date_format['%a, %b %d %H:%i:%S %Y GMT'].$product['date_add']." ]]></pubDate>\n";
//end of custom code
 echo "\t\t\t<description>";
 $cdata = true;

Link to comment
Share on other sites

  • 1 year later...

im having an error with pubDate -

 

pubDate must be an RFC-822 date-time

$image = Image::getImages((int)($cookie->id_lang), $product['id_product']);
 echo "\t\t<item>\n";
 echo "\t\t\t<title><![CDATA[".$product['name']." - ".html_entity_decode(Tools::displayPrice(Product::getPriceStatic($product['id_product']), $currency), ENT_COMPAT, 'UTF-8')." ]]></title>\n";
echo "t\t\t<pubDate><![CDATA[".$date_format['%a, %b %d %H:%i:%S %Y GMT'].$product['date_add']." ]]></pubDate>\n";
 echo "\t\t\t<description>";
 $cdata = true;

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...