Sample Code: A Corona-powered business app with Google Blogger

Ok Wordpress worked! :smiley: I used the free version, which is rss feed and http://sacsportsblog.wordpress/?feed=rss for the URL. I’m going to play with this for awhile, and also send a ticket to Google about the issue. I’ll post the solution to the Google Blogger if we come to one.

I just want to say thank you for all your help. :slight_smile: I’m a happy man now

Jeffrey

Well I thought it would stay working, but now I’m getting the same error as before:

2015-04-13 20:36:29.185 Corona Simulator[21558:507] Parsing the feed

2015-04-13 20:36:29.187 Corona Simulator[21558:507] Runtime error

/Users/user92217/Desktop/Sac Sports Blog/xml.lua:124: XmlParser: trying to close <meta> with <head>

stack traceback:

C: in function ‘error’

/Users/user92217/Desktop/Sac Sports Blog/xml.lua:124: in function ‘ParseXmlText’

/Users/user92217/Desktop/Sac Sports Blog/xml.lua:154: in function ‘loadFile’

/Users/user92217/Desktop/Sac Sports Blog/rss.lua:30: in function ‘feed’

/Users/user92217/Desktop/Sac Sports Blog/feed.lua:317: in function ‘processRSSFeed’

/Users/user92217/Desktop/Sac Sports Blog/feed.lua:340: in function </Users/user92217/Desktop/Sac Sports Blog/feed.lua:333>

I see the trying to close <meta> with <head> but I don’t know how to fix

the name is sacsportsblog.wordpress.rss and the URL is http://sacsportsblog.wordpress.com/?feed=rss

Also, now I’m not posting any images in the blog, because I’m guessing that the parser doesn’t work with that

Ok I’ve tried everything. Both with Wordpress(rss) and with Google Blogger(atom). I keep getting that same error. The URLs take me straight to the blog. Still don’t know how to get this working. :frowning:

<jeppy7>: The threshold question is whether the error is in your app or the remote RSS feed. Fortunately there is an easy way to test using W3C’s validator: http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fsacsportsblog.wordpress.com%2F%3Ffeed%3Drss

And it turns out that the sacsportblog site is valid RSS. Therefore the error is in your code. (There is an outside chance – a third possibility, in other words – that there’s a redirect, which you can check by saving to a static file on a site that you control without redirects.)

If what you found online is insufficient or doesn’t work, you may have to write your own RSS parser. I’ve written my own RSS/Atom feed generator in the past, and it isn’t too painful; if you’re dealing with a single valid RSS feed, parsing it should be pretty straightforward. You may want to buy one of the books on Lua programming.

I was starting to come to that conclusion myself as well. Thanks corona273, and much thanks to you Rob Miracle for all your help!

There are no meta and head tags in the feed:

\<?xml version="1.0" encoding="UTF-8"?\>\<rss version="2.0" &nbsp;&nbsp; &nbsp;xmlns:content="http://purl.org/rss/1.0/modules/content/" &nbsp;&nbsp; &nbsp;xmlns:wfw="http://wellformedweb.org/CommentAPI/" &nbsp;&nbsp; &nbsp;xmlns:dc="http://purl.org/dc/elements/1.1/" &nbsp;&nbsp; &nbsp;xmlns:atom="http://www.w3.org/2005/Atom" &nbsp;&nbsp; &nbsp;xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" &nbsp;&nbsp; &nbsp;xmlns:slash="http://purl.org/rss/1.0/modules/slash/" &nbsp;&nbsp; &nbsp;xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84\_pos#" xmlns:media="http://search.yahoo.com/mrss/" &nbsp;&nbsp; &nbsp;\> \<channel\> &nbsp;&nbsp; &nbsp;\<title\>sacsportsblog\</title\> &nbsp;&nbsp; &nbsp;\<atom:link href="https://sacsportsblog.wordpress.com/feed/" rel="self" type="application/rss+xml" /\> &nbsp;&nbsp; &nbsp;\<link\>https://sacsportsblog.wordpress.com\</link\> &nbsp;&nbsp; &nbsp;\<description\>\</description\> &nbsp;&nbsp; &nbsp;\<lastBuildDate\>Tue, 14 Apr 2015 04:54:07 +0000\</lastBuildDate\> &nbsp;&nbsp; &nbsp;\<language\>en\</language\> &nbsp;&nbsp; &nbsp;\<sy:updatePeriod\>hourly\</sy:updatePeriod\> &nbsp;&nbsp; &nbsp;\<sy:updateFrequency\>1\</sy:updateFrequency\> &nbsp;&nbsp; &nbsp;\<generator\>http://wordpress.com/\</generator\> \<cloud domain='sacsportsblog.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' /\> \<image\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<url\>https://s2.wp.com/i/buttonw-com.png\</url\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<title\>sacsportsblog\</title\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<link\>https://sacsportsblog.wordpress.com\</link\> &nbsp;&nbsp; &nbsp;\</image\> &nbsp;&nbsp; &nbsp;\<atom:link rel="search" type="application/opensearchdescription+xml" href="https://sacsportsblog.wordpress.com/osd.xml" title="sacsportsblog" /\> &nbsp;&nbsp; &nbsp;\<atom:link rel='hub' href='https://sacsportsblog.wordpress.com/?pushpress=hub'/\> &nbsp;&nbsp; &nbsp;\<item\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<title\>Welcome to my blog\</title\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<link\>https://sacsportsblog.wordpress.com/2015/04/14/welcome-to-my-blog-3/\</link\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<comments\>https://sacsportsblog.wordpress.com/2015/04/14/welcome-to-my-blog-3/#comments\</comments\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<pubDate\>Tue, 14 Apr 2015 03:22:22 +0000\</pubDate\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<dc:creator\>\<![CDATA[jeppy7]]\>\</dc:creator\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<category\>\<![CDATA[Uncategorized]]\>\</category\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<guid isPermaLink="false"\>http://sacsportsblog.wordpress.com/?p=14\</guid\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<description\>\<![CDATA[Hey sports fans!!! Welcome to my new Sacramento sports page. This blog is a place for Sac sports fans to come and see whats happening in the Sacramento, and all over the world. I plan to integrate some of my sporting interests as well. The mobile app version is already near completion. So watch for [&#8230;]\<img alt="" border="0" src="https://pixel.wp.com/b.gif?host=sacsportsblog.wordpress.com&#038;blog=89331984&#038;post=14&#038;subd=sacsportsblog&#038;ref=&#038;feed=1" width="1" height="1" /\>]]\>\</description\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<content:encoded\>\<![CDATA[\<p\>Hey sports fans!!! Welcome to my new Sacramento sports page. This blog is a place for Sac sports fans to come and see whats happening in the Sacramento, and all over the world. I plan to integrate some of my sporting interests as well. The mobile app version is already near completion. So watch for updates! I encourage healthy debates on here, as well as suggestions on new material. I will also try to post important dates, times, and locations/channels of local/popular events. I look forward to everyone&#8217;s inputs!\</p\>\<br /\>&nbsp; \<a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sacsportsblog.wordpress.com/14/"\>\<img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sacsportsblog.wordpress.com/14/" /\>\</a\> \<img alt="" border="0" src="https://pixel.wp.com/b.gif?host=sacsportsblog.wordpress.com&#038;blog=89331984&#038;post=14&#038;subd=sacsportsblog&#038;ref=&#038;feed=1" width="1" height="1" /\>]]\>\</content:encoded\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<wfw:commentRss\>https://sacsportsblog.wordpress.com/2015/04/14/welcome-to-my-blog-3/feed/\</wfw:commentRss\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<slash:comments\>0\</slash:comments\> &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<media:content url="https://2.gravatar.com/avatar/e714809a4476639cef5d3be7bc549761?s=96&#38;d=identicon&#38;r=G" medium="image"\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\<media:title type="html"\>jeppy7\</media:title\> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;\</media:content\> &nbsp;&nbsp; &nbsp;\</item\> &nbsp;&nbsp; &nbsp;\</channel\> \</rss\>

<meta> and <head> are HTML tags.  This sounds like you’re hitting a 404 page.

I just ran the project you uploaded.  I changed it back to RSS and I use this as the URL:  https://sacsportsblog.wordpress.com/feed/

Here is the contents of my console log:

Apr 14 18:49:26.583: &nbsp;&nbsp; &nbsp;Copyright (C) 2009-2015&nbsp; C o r o n a&nbsp;&nbsp; L a b s&nbsp;&nbsp; I n c . Apr 14 18:49:26.584: &nbsp;&nbsp; &nbsp;Version: 3.0.0 Apr 14 18:49:26.584: &nbsp;&nbsp; &nbsp;Build: 2015.2599 Apr 14 18:49:26.602: Platform: SM-G900S / x86\_64 / 10.10.3 / Intel HD Graphics 4000 OpenGL Engine / 2.1 INTEL-10.6.20 / 2015.2599 Apr 14 18:49:26.747: Loading project from:&nbsp;&nbsp; ~/Downloads/Sac Sports Blog Apr 14 18:49:26.747: Project sandbox folder: ~/Library/Application Support/Corona Simulator/Sac Sports Blog-AB4341FD906246FF863302C77211CB99 Apr 14 18:49:32.324: create scene Apr 14 18:49:32.326: enter scene Apr 14 18:49:32.578: enter scene Apr 14 18:49:32.579: show&nbsp;&nbsp; &nbsp;sacsportsblog.rss&nbsp;&nbsp; &nbsp;https://sacsportsblog.wordpress.com/feed/ Apr 14 18:49:32.580: entering displayFeed&nbsp;&nbsp; &nbsp;sacsportsblog.rss&nbsp;&nbsp; &nbsp;https://sacsportsblog.wordpress.com/feed/ Apr 14 18:49:32.630: calling processRSSFeed because the feed is avaialble Apr 14 18:49:32.631: Parsing the feed Apr 14 18:49:32.633: Number of items: 14 Apr 14 18:49:32.633: Num stories: 1 Apr 14 18:49:32.633: Got &nbsp;&nbsp; &nbsp;1&nbsp;&nbsp; &nbsp; stories, now show the tableView Apr 14 18:49:32.633: Calling showTableView() Apr 14 18:49:32.634: insert row:&nbsp; 1 [Welcome to my blog] Apr 14 18:49:32.634: row render

It appears to be working to me…

Rob