feed

ActionView::Template::Error (wrong number of arguments (1 for 0)) with atom_feed after upgrading to rails 3.1.0

依然范特西╮ 提交于 2019-12-01 06:05:24
I've just upgrade my rails application from the 3.0.7 version to the release candidate 3.1.0 and I got a strange error located in my atom feed builder: ActionView::Template::Error (wrong number of arguments (1 for 0)): 1: atom_feed do |feed| 2: feed.title("site name") 3: 4: for post in @posts app/views/posts/index.atom.builder:1:in `_app_views_posts_index_atom_builder___1517323884_2197638100' It seems to need an argument in the atom_feed method, but I tried to put something in it and it hasn't fixed the problem. It worked before the upgrade. Builder 3.0 is not compatible with fast_xs 0.8.0 on

Need read XML and show it and save on Local storage.

萝らか妹 提交于 2019-12-01 01:11:41
I need to read XML data and show this in HTML and at the same time save it in localStorage. When the user is ofline I need show the content using localStorage. ( NOTE: without PHP) ( NOTE: when user have internet read and show new items ) Does anyone have a good tutorial or any helpful website? I found this article/tutorial. It shows how to parse and save a xml file. And how you can query it offline. It is done by using javascript. Article is on mantascode.com by Mantascode and describes how to parse a xml file to localstorage. using a launch.html to parse xml file using java script. <!DOCTYPE

Difference between description and content:encoded tags in RSS2

試著忘記壹切 提交于 2019-11-30 14:30:53
问题 What is the difference, if any, between the <description> tag and the <content:encoded> tag in RSS 2.0 format specifications? Is one more important than the other? Should I be using both in my feeds or one will suffice? 回答1: The <description> tag is for the summary of the post, but in plain text only. No markup. You can get around that if you escape the tags or wrap the content in: <![CDATA[ post body goes <strong>here</strong> ]> But you're not really supposed to be doing that. If you want

How to properly place Date in <pubdate> element on RSS feed

自古美人都是妖i 提交于 2019-11-30 14:02:13
问题 I'm using RSS Graffitty to post RSS items to a facebook page. The app told me the items were missing the publication date so I added this tag: echo "<pubdate>".$row['Date']."</pubdate>"; $row['Date'] is obtained from my MySQL database and it's a Datetime column. How must I format it/echo it so it's recognized by the RSS feed? Must I change the element? Thanks 回答1: RSS 2.0 specifications on the <pubDate> element should conform to the RFC 822 Date and Time syntax. Namely, to display it in the

Check if remote file is well-formed XML with PHP

倾然丶 夕夏残阳落幕 提交于 2019-11-30 13:46:12
I have a PHP-driven site that includes an XML stock feed, which is remotely served from ASP (i.e. the XML feed url is of the order: http://remote.com/client.asp ). As the feed is often unavailable (by which I mean the site returns an ASP error) I'd like to check if the feed is well-formed XML before including it. My usual url_exists function doesn't do the trick as of course the URL does exist even when 'erroring'. TIA. Use cURL to get the result and simplexml to check if the XML is well-formed . $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "http://remote.com/client.asp"); curl_setopt(

Facebook page's posts feed

倾然丶 夕夏残阳落幕 提交于 2019-11-30 09:20:50
Does anyone know how to fetch a facebook page's rss-feed nowadays? When I log in as a page and go to http://www.facebook.com/feeds/notifications.php?id=xx&viewer=xx&key=xx&format=rss20 , I get an empty feed. Is there a corresponding "page" feed that contains the pages posts? Thanks, /M The IDs in the URL below are the IDs you need to find to create your rss feed. http://www.new.facebook.com/feeds/notifications.php?id= YOUR_FACEBOOK_ID &viewer= YOUR_FACEBOOK_ID &key= YOUR_INTERNAL_KEY &format=rss20 There are 3 numbers in this URL. The number that follows “id” is your Facebook ID number. This

How to properly place Date in <pubdate> element on RSS feed

和自甴很熟 提交于 2019-11-30 09:07:17
I'm using RSS Graffitty to post RSS items to a facebook page. The app told me the items were missing the publication date so I added this tag: echo "<pubdate>".$row['Date']."</pubdate>"; $row['Date'] is obtained from my MySQL database and it's a Datetime column. How must I format it/echo it so it's recognized by the RSS feed? Must I change the element? Thanks RSS 2.0 specifications on the <pubDate> element should conform to the RFC 822 Date and Time syntax . Namely, to display it in the following format: Fri, 21 Dec 2012 10:00:01 GMT If you error run your RSS feed through the W3C Feed

Difference between description and content:encoded tags in RSS2

你说的曾经没有我的故事 提交于 2019-11-30 07:58:31
What is the difference, if any, between the <description> tag and the <content:encoded> tag in RSS 2.0 format specifications? Is one more important than the other? Should I be using both in my feeds or one will suffice? The <description> tag is for the summary of the post, but in plain text only. No markup. You can get around that if you escape the tags or wrap the content in: <![CDATA[ post body goes <strong>here</strong> ]> But you're not really supposed to be doing that . If you want markup, you're supposed to use <content:encoded> and use the <![CDATA[ and ]> wrappers here. The content

Remove “via APP_NAME” on post made from facebook graph api in rails

丶灬走出姿态 提交于 2019-11-29 15:49:38
Currently, I'm using RestClient to make simple posts to friends' timelines. RestClient.post 'https://graph.facebook.com/_friend_/feed', :access_token => "_token_", :message => "_message_" This works, but when it appears on my friend's timeline, there is text at the bottom of the post that says "via APP_NAME". Is there any way to get rid of that? No - only Facebook's site can do that. 3rd party apps will always show what app it was posted by. 来源: https://stackoverflow.com/questions/9014659/remove-via-app-name-on-post-made-from-facebook-graph-api-in-rails

Facebook page's posts feed

强颜欢笑 提交于 2019-11-29 14:12:52
问题 Does anyone know how to fetch a facebook page's rss-feed nowadays? When I log in as a page and go to http://www.facebook.com/feeds/notifications.php?id=xx&viewer=xx&key=xx&format=rss20, I get an empty feed. Is there a corresponding "page" feed that contains the pages posts? Thanks, /M 回答1: The IDs in the URL below are the IDs you need to find to create your rss feed. http://www.new.facebook.com/feeds/notifications.php?id= YOUR_FACEBOOK_ID &viewer= YOUR_FACEBOOK_ID &key= YOUR_INTERNAL_KEY