Setting up custom News Feeds


#1

As of the time of this writing, Ushahidi's "Official & Mainstream news" section only allows RSS-style news feeds. This requires an existing RSS feed for the particular topic that you're monitoring.


One way to set up a custom RSS feed is to use Google News.


1) Setup a google account.

2) Go to http://news.google.com

3) Search for the type of stories you want, example "Oakland Riots"

4) Click the link at the bottom of the page that says "Add a custom section for Mehserle-verdict to Google News". This will add the custom feed to the list of feeds in the left column.

5) Click on the new feed (e.g. "Oakland Riots") in the list of feeds in the left column

6) Click on the RSS link / icon at the bottom of the page.

7) That url is your custom news feed - add it to Ushahidi in the admin/manage/feeds page


You can create different feeds for different search terms



#2

Hi,


I tried adding a news feed this way. But I get the following error when I try to refresh the feed:

Code:

An error was detected which prevented the loading of this page. If this problem persists, please contact the website administrator.

application/libraries/Geocoder.php [110]:

file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration


Clearly, my webhost has disabled URL file-access, possibly for security reasons. So, to get around this, I thought I could set up a cron job that would fetch the rss feed and store it locally. So I tried that and added "~/www/path-to-rss" in my Ushahidi feed URL. But I still get the same file-access disabled error.


How do I get around this?



#3

I got around this problem using curl instead of file_get_contents ...


If this might be a useful patch, somebody let me know!


<<

$georss = file_get_contents($request_url);


>>

$ch = curl_init();

$timeout = 0;

curl_setopt ($ch, CURLOPT_URL, $request_url);

curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);

$georss = curl_exec($ch);

curl_close($ch);



#4

None of the feeds that I've added to Crowdmap are refreshing and there are no items. How do I fix this?



#5

Confirmed, i have added RSS feeds to the crowdmap interface. No items are showing up. Does this feature work at all?



#6

This feature is not working for me.

I believe I have the correct feed URL -

feed://genderindia.blogspot.com/feeds/posts/default/-/Article?alt=rss

The feed contains 23 items but it’s listed as “0” in the crowdmap > dashboard > feeds.

I think the News Feed is a great feature and hope that it will be looked into…

Thanks


#7

Newsfeed does work for our Crowdmap deployments:

Here’s how we manage it:

Go to Manage > Newsfeeds

Add feed name, feed url  and Save

Click “Refresh News Feed” at top of window

For extra measure, go to Scheduler next

edit News Feed 's refresh schedule

Click “Force Run Scheduler” at top of window.

May take some time for items to show up, depending on several factors.  Hope this helps!

 


#8

Hi Lea,

Thanks for the suggestion.  I did try the steps on three different occasions but it was not successful.  Perhaps I am not doing it correctly but the steps your outlined are fairly straightforward.

Thanks!


#9

HI Mkhaund, there was a bug with the Scheduler which was fixed in the recent Crowdmap release. (Last week) Can you please try again with the instructions above and let me know if it works for you now?

 

Heather


#10

Hi Heather,

Thanks for the update. Sorry to say that my feed is not working.  I followed the steps that Lea had outlined.  Perhaps I need a different format for my feed.

feed://www.genderindia.blogspot.com/feeds/posts/default/-/Article

Using the above feed URL displays “0” Feed Items.


#11

Hi Mkhaund, I will ask the developer team to take a look

Heather


#12

An RSS News Feed custom portlet enables you to add an RSS feed to any dashboard.