1

独自の RSS フィードをセットアップする方法を探しています。私は自分のウェブサイトに何かを投稿できるようにしたいのですが (私にロックされているか、メモ帳を使用して)、このフィードを facebook や twitter にも投稿したいと思っています。

これを設定するための初心者の方法はありますか、それともソフトウェアを購入することでよりうまく解決できますか?

ノートブックで更新する RSS フィードを設定する私の悪い試みは次のとおりです (ただし、これは一時的に意図したとおりに機能していません)。

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">


<channel>
    <title>First post title</title>
        <link>http://www.mysite.com</link>
    <description>I'm posting a lot of words to fill in this space for my first potential rss feed, let's hope it works!</description>
        <atom:link href="http://www.mysite.com" rel="self" type="application/rss+xml" />

<item>
    <title>Or maybe this is the first title</title>
    <link>http://www.mysite.com/page.html</link>
    <pubDate>Mon, 03 Dec 2012 16:50:32</pubDate>
    <guid isPermaLink="true">http://www.mysite.com/page.html</guid>
    <description>This is potentially the first post or perhaps the second post of the new feed being create.<description>
</item>


</channel>
</rss>
4

1 に答える 1

2

フィードにいくつかの問題があります。具体的には、日付が無効で、商品説明の終了タグがありません。次のことを試してください。

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>

    <title>First post title</title>
    <link>http://www.mysite.com</link>
    <description>I'm posting a lot of words to fill in this space for my first potential rss feed, let's hope it works!</description>
    <atom:link href="http://www.mysite.com" rel="self" type="application/rss+xml" />

    <item>
      <title>Or maybe this is the first title</title>
      <link>http://www.mysite.com/page.html</link>
      <pubDate>Mon, 03 Dec 2012 16:50:32 GMT</pubDate>
      <guid isPermaLink="true">http://www.mysite.com/page.html</guid>
      <description>This is potentially the first post or perhaps the second post of the new feed being create.</description>
    </item>

  </channel>
</rss>

フィードを手動で作成している場合は、W3C Feed Validatorでマークアップを検証できます。

これを自動化する方法はたくさんありますが、現在 Web サイトのコンテンツをどのように生成しているかを知らずに推奨を提供することは不可能です。

于 2013-01-04T04:16:02.450 に答える