News: TinyPortal Release Schedule. Please read this update for More Info.

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

September 19, 2019, 02:50:21 PM

Login with username, password and session length

Recent

Members
  • Total Members: 3752
  • Latest: Alizee
Stats
  • Total Posts: 188917
  • Total Topics: 20754
  • Online Today: 126
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 1
Guests: 64
Total: 65

Author Topic: Is there a way to make a block that shows my current facebook wall posts?  (Read 8827 times)

0 Members and 1 Guest are viewing this topic.

Offline Xtreme4U2NV

  • Jr. Member
  • **
  • Posts: 15
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.

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Is there a way to make a block that shows my current facebook wall posts?
« Reply #1 on: November 01, 2013, 02: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


Offline Xtreme4U2NV

  • Jr. Member
  • **
  • Posts: 15
Re: Is there a way to make a block that shows my current facebook wall posts?
« Reply #2 on: November 01, 2013, 02:53:58 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"

Code: [Select]
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>
  ^

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Is there a way to make a block that shows my current facebook wall posts?
« Reply #3 on: November 01, 2013, 03:24:00 PM »
Where are you getting the feed URL? I don't see that facebook provides an RSS feed URL.

Offline Xtreme4U2NV

  • Jr. Member
  • **
  • Posts: 15
Re: Is there a way to make a block that shows my current facebook wall posts?
« Reply #4 on: November 01, 2013, 03:26:52 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

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Is there a way to make a block that shows my current facebook wall posts?
« Reply #5 on: November 01, 2013, 10:39:47 PM »
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.
Code: [Select]
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');

Offline Xtreme4U2NV

  • Jr. Member
  • **
  • Posts: 15
Re: Is there a way to make a block that shows my current facebook wall posts?
« Reply #6 on: November 02, 2013, 08:34:10 PM »
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.
Code: [Select]
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?

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Is there a way to make a block that shows my current facebook wall posts?
« Reply #7 on: November 03, 2013, 04:39:55 PM »
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.

Offline WillyP

  • Support Team
  • *
  • Posts: 769
    • Planet Descent
Re: Is there a way to make a block that shows my current facebook wall posts?
« Reply #8 on: November 11, 2013, 03:34:36 PM »
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.