Twitter RSS Feeds

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
Mies
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 19 Jun 2013, 19:36

Re: Twitter RSS Feeds

Postby Mies » 20 Jun 2013, 13:07


reibuehl
Bear Rating Trainee
Bear Rating Trainee
Posts: 25
Joined: 17 May 2013, 19:37

Re: Twitter RSS Feeds

Postby reibuehl » 20 Jun 2013, 15:42


jdelamater99
Bear Rating Master
Bear Rating Master
Posts: 109
Joined: 11 Apr 2013, 17:45

Re: Twitter RSS Feeds

Postby jdelamater99 » 20 Jun 2013, 17:09

What screen name is it not working with? You can send me a PM if you don't want to reply publicly with it. I haven't come across any screen names that don't work in my testing.

lbb
Bear Rating Trainee
Bear Rating Trainee
Posts: 7
Joined: 18 Jun 2013, 20:30

Re: Twitter RSS Feeds

Postby lbb » 20 Jun 2013, 17:20


jclamen
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 17 Jun 2013, 19:21

Re: Twitter RSS Feeds

Postby jclamen » 21 Jun 2013, 01:03

I modified the script to retrieve the results of a Twitter search. Since it was kind of hassle, I'm sharing the changes here. This is a diff between an earlier version of twitter_parser.php and my version. The search string is hardcoded and I didn't bother removing the stuff that is no longer relevant.

11c11,12
< $path = '/1.1/statuses/user_timeline.json'; // api call path
---
> //$path = '/1.1/statuses/user_timeline.json'; // api call path
> $path = '/1.1/search/tweets.json'; // api call path
23,25c24,27
< 'screen_name' => $sn,
< 'count' => $cnt,
< 'exclude_replies' => 'true'
---
> // 'screen_name' => $sn,
> // 'count' => $cnt,
> // 'exclude_replies' => 'true'
> 'q' => 'SEARCH STRING'
78c80,84
< $options = array( CURLOPT_HTTPHEADER => array("Authorization: $auth"),
---
> // including the query details and the authorization in the headers is crucial
> // the authorization and the query details could probably be left away from the query above
> $options = array(
> CURLOPT_HTTPHEADER => array("q: SEARCH STRING"),
> CURLOPT_HTTPHEADER => array("Authorization: $auth"),
115c121,124
< print('<title>@'.$twitter_data[0]['user']['screen_name'].'</title>'. PHP_EOL);
---
> print('<title>SEARCH STRING</title>'. PHP_EOL);
>
> // search results include an additional layer before we can get to the data
> $twitter_data = $twitter_data['statuses'];

jdelamater99
Bear Rating Master
Bear Rating Master
Posts: 109
Joined: 11 Apr 2013, 17:45

Re: Twitter RSS Feeds

Postby jdelamater99 » 21 Jun 2013, 03:48


jdelamater99
Bear Rating Master
Bear Rating Master
Posts: 109
Joined: 11 Apr 2013, 17:45

Re: Twitter RSS Feeds

Postby jdelamater99 » 21 Jun 2013, 03:50


reibuehl
Bear Rating Trainee
Bear Rating Trainee
Posts: 25
Joined: 17 May 2013, 19:37

Re: Twitter RSS Feeds

Postby reibuehl » 21 Jun 2013, 10:06

Thanks very much for supporting home timeline! You are amazing!

Astalaseven
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 22 Jun 2013, 13:20

Re: Twitter RSS Feeds

Postby Astalaseven » 22 Jun 2013, 13:30

Hi!

I made a little python script that doesn't make use of Twitter API, it is available on Github: https://github.com/Astalaseven/twitter-rss
It can be used to generate a feed based on an user or hashtag. Several ways are possible to create a feed: using the web form, going to your_server/user/chosen_user.xml or your_server/htag/chosen_htag.xml and finally using the file that contains all the user/htag: user/user.txt and htag/htag.txt

The twitter_rss.py file can work alone to update the feeds if they can be found in the specified files. It is lighter than launching the whole webserver ^^

Perhaps it can be helpful for some of you :)

jdelamater99
Bear Rating Master
Bear Rating Master
Posts: 109
Joined: 11 Apr 2013, 17:45

Re: Twitter RSS Feeds

Postby jdelamater99 » 23 Jun 2013, 03:44

Nice work, but since the webserver has to be up to run tt-rss, I don't really see that as being an issue. But it might help someone else out. :D

Astalaseven
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 22 Jun 2013, 13:20

Re: Twitter RSS Feeds

Postby Astalaseven » 23 Jun 2013, 17:43


liquidblasted
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 24 Jun 2013, 12:16

Re: Twitter RSS Feeds

Postby liquidblasted » 24 Jun 2013, 12:43


jdelamater99
Bear Rating Master
Bear Rating Master
Posts: 109
Joined: 11 Apr 2013, 17:45

Re: Twitter RSS Feeds

Postby jdelamater99 » 24 Jun 2013, 19:13

I just updated my script to v1.0!

Search support has been added.
your_URL_here/path_to_twitter_parser?q=foobar

Next up will be URL resolving, but I'm going on vacation at the end of the week, so, it will likely be a couple weeks before that's added.

https://github.com/jdelamater99/Twitter-RSS-Parser

twitterfan
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 13 Jun 2013, 01:58

Re: Twitter RSS Feeds

Postby twitterfan » 24 Jun 2013, 23:25

Hello,

i have a problem: I am using your code and use it within a rss widget in Wordpress. Works fine and now all links also work, but: The feed does not update - there are still tweets from 19th of june... why doesn´t it update? No cache-problem so far... can anyone help me?

jdelamater99
Bear Rating Master
Bear Rating Master
Posts: 109
Joined: 11 Apr 2013, 17:45

Re: Twitter RSS Feeds

Postby jdelamater99 » 24 Jun 2013, 23:37

I don't use wordpress, so I won't be much of help with this, but it sounds like the script isn't running or at least not at regular intervals.

When the script runs, it uses the count variable and pulls that many results from twitter. The script itself doesn't do any sort of caching at all, so if it's working it's always pulling down the latest tweets.

Silly question, but have the problem accounts actually posted?


Return to “Support”

Who is online

Users browsing this forum: No registered users and 10 guests