Twitter RSS Feeds
-
- Bear Rating Trainee
- Posts: 6
- Joined: 15 Jun 2013, 23:19
Re: Twitter RSS Feeds
I'm almost speechless with gratitude!
In less than 48 hours, I've installed tt-rss on my hosting provider, migrated my feeds from G***** Reader, installed some useful plugins, tried out some great themes, begun testing various mobile interfaces, received some great guidance by reading the forum, and now, implemented this fantastic fix for my various broken Twitter feeds.
Thanks to jdelamater99, Fox, and everyone who's worked on tt-rss, created plugins or themes, or shared their expertise in this forum.
In less than 48 hours, I've installed tt-rss on my hosting provider, migrated my feeds from G***** Reader, installed some useful plugins, tried out some great themes, begun testing various mobile interfaces, received some great guidance by reading the forum, and now, implemented this fantastic fix for my various broken Twitter feeds.
Thanks to jdelamater99, Fox, and everyone who's worked on tt-rss, created plugins or themes, or shared their expertise in this forum.
Re: Twitter RSS Feeds
Hi all,
I have created a little modified version that supports search too. If someone finds it usefull feel free to use it.
Source: http://pastebin.com/3AFvuEAx
P.S.
I have not written any PHP code over 8 years so probably it is not the best one
I have created a little modified version that supports search too. If someone finds it usefull feel free to use it.
Source: http://pastebin.com/3AFvuEAx
P.S.
I have not written any PHP code over 8 years so probably it is not the best one
-
- Bear Rating Trainee
- Posts: 6
- Joined: 15 Jun 2013, 23:19
Re: Twitter RSS Feeds
lem0na wrote:Hi all,
I have created a little modified version that supports search too. If someone finds it usefull feel free to use it.
Source: http://pastebin.com/3AFvuEAx
P.S.
I have not written any PHP code over 8 years so probably it is not the best one
Wow! I spent some time this evening trying to figure out how to modify the original script to do a search, gave up, and was about to ask for help when you posted this. Thank you so much!
-
- Bear Rating Trainee
- Posts: 6
- Joined: 15 Jun 2013, 23:19
Re: Twitter RSS Feeds
Would you please tell me what I should replace your URL with in line 152?
Thanks again.
Code: Select all
print('<link type="application/atom+xml" rel="self" href="http://lem0na.net/twitrss.php" />' .PHP_EOL);
Thanks again.
Re: Twitter RSS Feeds
Hi disillusioned,
I think you can safely skip this line, or change the url with the url of your script. I do not think it matters.
b.r.
lem0na
I think you can safely skip this line, or change the url with the url of your script. I do not think it matters.
b.r.
lem0na
Re: Twitter RSS Feeds
Hello
Thanks a lot for this script, it makes my life easier.
I follow a twitter user (thetoolpage) and when I converted its feed with this script (using lem0na's version), the resulting feed did not validate (Tiny Tiny RSS complained about not being able to parse the document). The culprit was an ampersand character ('&') in the tweets.
And as it could happen quite often, here's the fix for that. Whenever you see: replace it with:
Then, I set out to make the feed pass validation, by adding this before the first call to print:
And I have a question (which makes the feed not pass validation yet): why are you outputting HTML code in the <content> tag? I don't see the use of those body and empty paragraphs tag...
Regards,
zeiram
Thanks a lot for this script, it makes my life easier.

I follow a twitter user (thetoolpage) and when I converted its feed with this script (using lem0na's version), the resulting feed did not validate (Tiny Tiny RSS complained about not being able to parse the document). The culprit was an ampersand character ('&') in the tweets.
And as it could happen quite often, here's the fix for that. Whenever you see:
Code: Select all
$item['text']
Code: Select all
htmlspecialchars($item['text'], ENT_NOQUOTES | ENT_XML1)
Then, I set out to make the feed pass validation, by adding this before the first call to print:
Code: Select all
header('Content-type: application/atom+xml; charset=UTF-8');
And I have a question (which makes the feed not pass validation yet): why are you outputting HTML code in the <content> tag? I don't see the use of those body and empty paragraphs tag...
Regards,
zeiram
Re: Twitter RSS Feeds
Hi all,
I found another issue: result after calling processString returns corrupted result that prevents importing the feeds.
So far i observed that if the tweet text ends with something line http://t.co/gsFD... the generated url contains invalid charactes that prevents feeds import.
After I commented this function call the feeds are imported successfuly but as raw text
b.r.
lem0na
I found another issue: result after calling processString returns corrupted result that prevents importing the feeds.
So far i observed that if the tweet text ends with something line http://t.co/gsFD... the generated url contains invalid charactes that prevents feeds import.
After I commented this function call the feeds are imported successfuly but as raw text
b.r.
lem0na
-
- Bear Rating Master
- Posts: 109
- Joined: 11 Apr 2013, 17:45
Re: Twitter RSS Feeds
thats the function that searches for http(s) links and wraps them in <a> tags. you'll want to study up on you regular expressions if you want to try editing that.
Re: Twitter RSS Feeds
Hi all,
Is it possible with this script to "resolve" shortened URLs and embed pictures if the link points to a picture in a twitter feed?
BR
Reiner.
Is it possible with this script to "resolve" shortened URLs and embed pictures if the link points to a picture in a twitter feed?
BR
Reiner.
-
- Bear Rating Master
- Posts: 109
- Joined: 11 Apr 2013, 17:45
Re: Twitter RSS Feeds
I'll look into this when I get a chance.
- sleeper_service
- Bear Rating Overlord
- Posts: 884
- Joined: 30 Mar 2013, 23:50
- Location: Dallas, Texas
Re: Twitter RSS Feeds
yes please!jdelamater99 wrote:I'll look into this when I get a chance.
Re: Twitter RSS Feeds
Would using this method allow the reading of a users (me obviously) private twitter lists?
I have a bunch of companies in a list, twitter is useless as an announcement/news repository as posts don't wait like post to RSS do (whoever suggested twitter as a google reader replacement is a moron imo).
I'm looking for something that could take this twitter list and covert it to rss. I've played with TTR but not extensively (lack of windows client is a partial reason)
I have a bunch of companies in a list, twitter is useless as an announcement/news repository as posts don't wait like post to RSS do (whoever suggested twitter as a google reader replacement is a moron imo).
I'm looking for something that could take this twitter list and covert it to rss. I've played with TTR but not extensively (lack of windows client is a partial reason)
- sleeper_service
- Bear Rating Overlord
- Posts: 884
- Joined: 30 Mar 2013, 23:50
- Location: Dallas, Texas
Re: Twitter RSS Feeds
psycik wrote:Would using this method allow the reading of a users (me obviously) private twitter lists?
I have a bunch of companies in a list, twitter is useless as an announcement/news repository as posts don't wait like post to RSS do (whoever suggested twitter as a google reader replacement is a moron imo).
I'm looking for something that could take this twitter list and covert it to rss. I've played with TTR but not extensively (lack of windows client is a partial reason)
I'm really not sure what it is you think you're asking for, but I think that the answer is 'yes'.
Re: Twitter RSS Feeds
Private Twitter lists to RSS (in a nutshell)
- sleeper_service
- Bear Rating Overlord
- Posts: 884
- Joined: 30 Mar 2013, 23:50
- Location: Dallas, Texas
Re: Twitter RSS Feeds
if it can be pulled out via the twitter api, then it can be stuffed into rss.psycik wrote:Private Twitter lists to RSS (in a nutshell)
or, you could just subscribe to all the twitter feeds you want via rss.
Who is online
Users browsing this forum: No registered users and 8 guests