TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 10:09:44 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 77
  • Total: 78
  • tino

Is there a way to make a block that shows my current facebook wall posts?

Started by Xtreme4U2NV, October 31, 2013, 09:35:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Xtreme4U2NV

Link to my forum: http://www.rcacres.ca
SMF version: SMF 2.0.6
TP version: 1.107
Default Forum Language: English
Theme name and version: CZ Ink
Browser Name and Version: Google Chrome and Firefox
Mods installed: just TinyPortal
Related Error messages: tinyportal XML error: not well-formed (invalid token) at line 9

I tried making a RSS block with the Facebook RSS of my page and I got the above error.

I work with a race track.  Some older fellows don't use Facebook and would like notifications.  Facebook is where everything is posted first.  So I was aiming to create a block that had the posts from our Facebook page so those not on the Facebook bandwagon can stay in the loop.

And to avoid being a nuisance, I did try to search and couldn't find an answer.

Your help is great appreciated.

IchBin

What's the URL for the RSS feed? Have you tested the URL in an RSS validator to see if the code being output in the feed is valid?
http://validator.w3.org/feed/check.cgi


Xtreme4U2NV

Quote from: IchBin™ on November 01, 2013, 08:46:07 PM
What's the URL for the RSS feed? Have you tested the URL in an RSS validator to see if the code being output in the feed is valid?
http://validator.w3.org/feed/check.cgi

Just tested with that link, it says "Congratulations, this is a valid RSS feed"

It did say this right below that though"

Recommendations

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.
line 14, column 37: Email address is missing real name [help]
    <webMaster>webmaster@facebook.com</webMaster>
                                     ^
line 696, column 2: Missing atom:link with rel="self" [help]
  </channel>
  ^

IchBin

Where are you getting the feed URL? I don't see that facebook provides an RSS feed URL.

Xtreme4U2NV

Quote from: IchBin™ on November 01, 2013, 09:24:00 PM
Where are you getting the feed URL? I don't see that facebook provides an RSS feed URL.

https://www.facebook.com/help/212445198787494/

There is a link to the Notifications page, which then provides the RSS url

IchBin

It would seem that Facebook RSS feeds have to have a cetain user_agent in order to work through the PHP rss functions. Open your Sources/TPSubs.php file and search for the TPparseRSS() function somewhere around line 2000.

Right after the global line add this and see if it works.
ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9');

Xtreme4U2NV

Quote from: IchBin™ on November 02, 2013, 04:39:47 AM
It would seem that Facebook RSS feeds have to have a cetain user_agent in order to work through the PHP rss functions. Open your Sources/TPSubs.php file and search for the TPparseRSS() function somewhere around line 2000.

Right after the global line add this and see if it works.
ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9');

That seemed to work fantastic, but is there a way to limit the amount of posts that the RSS puts up?

IchBin

Currently the code only reads what is in the feed. No way to limit the feed I'm afraid. If you want to do stuff like that, you'll have to look into third party site that can process your feed before you hand it off for TP to parse.

Somethine like www.rss2html.com

There are a handful of sites out there that will do this for you.

WillyP

Facebook offers many other ways to integrate with your site and siphon off visitors... have you looked at the developer site? For example, Activity Feed - Facebook Developers.