Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Ruth_HB on
Hello everyone!
I am utilizing the aggregator module for Drupal 6.17 to display the RSS feeds of a Facebook wall in a block that I have located in the sidebar. Everything looks great except for links to the Facebook wall posts. For some reason rather than linking to http://www.facebook.com/permalink.php?story_fbid=.. etc, it's linking to my site: http://www.mysite.com/permalinkphp?story.. etc. However, if the RSS links to the photo album in Facebook, it appears correctly e.g.: http://www.facebook.com/album.php?aid=.....
Any help would be appreciated from this newbie!
Comments
Here's the link to my test site..
I thought it might be helpful to include the actual site.
http://www.ruthhong.com/drupal3
The aggregator module is located in the sidebar. You'll notice try clicking on the first link and then the last link. I'm not sure why for the link to the Facebook albums is correct but the link to the wall posts are going to http://www.ruthhong.com/drupal3.
You are not doing anything wrong ... It's a Facebook bug
Ruth,
Typically RSS feeds have direct links to resources included in the feed.
If you look at the Facebook feed you are using:
http://www.facebook.com/feeds/page.php?format=atom10&id=115414949761
The album links are working fine because they have the full URL in it, like the one below:
but the other links are not because those do no have the full URL:
So you need to send out an email to the support team on Facebook and ask them to rectify it.
I won't be surprised if anyone here could provide a solution like scraping the content of the feed, and re-writing it ... I just don't think it's worth the effort. I rather have Facebook fix this once and for all.
Cheers
Raakesh
... Drupal has this bug too...
When I add the RSS feed of Drupal (the standard Syndication, no other module) in iGoogle, I also only have the 'shortened' links.
So when I have a link to another page on my site, I get the error
"The requested URL /node/78/lightbox2 was not found on this server. "
Any way around this?
Kind regards,
Peter
for what it's worth... the
for what it's worth... the facebook feed doesn't even validate.
http://validator.w3.org/feed/check.cgi?url=feed%3A%2F%2Fwww.facebook.com...
Largely because of their use of relative links.
I've submitted a "suggestion". But this seems to have been an issue for a while. The RSS/Atom standard SHOULD support relative links, but it doesn't. So... FB needs to fix this.
"fix"
So I made up a very simple php script that I run on my site that fixes the offending FB code. Replace FEEDURL with the full feed URL, and the USERNAME with your facebook username, and this will grab the feed, preg_replace the crappy relative URLs, and replace them with legal absolute URLs.
For what it's worth, here's the bit FB neglected in implementing their RSS feed.
RSS places restrictions on the first non-whitespace characters of the data in
and elements. The data in these elements must begin with an IANA-registered URI scheme, such as http://, https://, news://, mailto: and ftp://. Prior to RSS 2.0, the specification only allowed http:// and ftp://, however, in practice other URI schemes were in use by content developers and supported by aggregators. Aggregators may have limits on the URI schemes they support. Content developers should not assume that all aggregators support all schemes.
I'm sorry, could you explain
I'm sorry, could you explain where to put that code?
I found the url of my compagny Facebook page RSS. But yeah it doesn't work through the aggregator module.
Tried adding your code to template.php but it doesnt change anything.