久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Facebook 取消了公共 RSS 提要;如何使用新的時(shí)間線

Facebook killed Public RSS feeds; how to obtain a Facebook Page RSS with the new Timeline?(Facebook 取消了公共 RSS 提要;如何使用新的時(shí)間線獲取 Facebook 頁(yè)面 RSS?)
本文介紹了Facebook 取消了公共 RSS 提要;如何使用新的時(shí)間線獲取 Facebook 頁(yè)面 RSS?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我正在嘗試從 Facebook 中提取到 RSS 的頁(yè)面提要,但是每次我嘗試嘗試時(shí),我都會(huì)在 XML 中收到錯(cuò)誤消息,并顯示以下內(nèi)容:

I'm attempting to pull out a page feed to RSS from Facebook, however each time I attempt to try it, I get an error back in the XML with the following :

<![CDATA[
This feed URL is no longer valid. Visit this page to find the new URL, if you have access: &lt;a href=&quot;https://www.facebook.com/profile.php?id=<FB_ID>&quot;&gt;https://www.facebook.com/profile.php?id=<FB_ID>&lt;/a&gt;
]]>

我使用的網(wǎng)址是:

https://www.facebook.com/feeds/page.php?id=<fb_id>&format=rss20&access_token=<my_page_token>

我沒(méi)有設(shè)置年齡限制或國(guó)家/地區(qū)限制:

I don't have an age restriction set nor a country restriction:

此外,我已經(jīng)嘗試過(guò)使用和不使用訪問(wèn)令牌.

Further, I've tried it with and without my access token.

如下面的評(píng)論所述,JSON URL 確實(shí)有效:

As noted in the comments below, the JSON URL is indeed working:

https://graph.facebook.com/<page_name>/feed&https://www.facebook.com/<page_name>/??feed?access_token=<token>

這里發(fā)生了什么/我該如何解決問(wèn)題?

推薦答案

我遇到了同樣的問(wèn)題.在尋找解決方案后,我發(fā)現(xiàn) FB 默默地扼殺了公共 RSS 支持.(參見(jiàn) Jesse Stay 的這篇文章)

I got with the same problem. After looking for a solution I found that FB silently killed public RSS support. (see this post from Jesse Stay)

我知道我需要自己調(diào)用 API 并構(gòu)建提要(我還需要通過(guò) WP 插件和其他東西來(lái)解析提要.

I understood that I needed to call the API myself and construct the feed (I also need the feed to be parsed by a WP plugin and other stuff.

因此,首先獲取 API 密鑰(也稱(chēng)為應(yīng)用程序 ID)并下載 PHP Facebook SDK.

So, first of all get an API key (also called app id) and download the PHP Facebook SDK.

然后下載Universal Feed Generator PHP 類(lèi).它將為您生成所有必需的標(biāo)頭和 xml.

Then download the Universal Feed Generator PHP class. It will generate all the required headers and xml for you.

你的 php 腳本將是這樣的:

Your php script will be like this:

require('lib/facebook.php'); // require your facebook php sdk
include("feed_generator/FeedWriter.php"); // include the feed generator feedwriter file

$fb = new facebook(array(
    'appId' =>  'YOUR_APP_ID', // get this info from the facebook developers page
    'secret'=>  'YOUR_SECRET_KEY' // by registering an app
));
$response = $fb->api('/spreetable/feed','GET'); // replace "spreetable" with your fb page name or username

// create the feedwriter object (we're using ATOM but there're other options like rss, etc)
$feed = new FeedWriter(ATOM);

$feed->setTitle('Spree Table'); // set your title
$feed->setLink('http://spreetable.com/facebook/feed.php'); // set the url to the feed page you're generating

$feed->setChannelElement('updated', date(DATE_ATOM , time()));
$feed->setChannelElement('author', array('name'=>'Spree Table')); // set the author name

// iterate through the facebook response to add items to the feed
foreach($response['data'] as $entry){
        if(isset($entry["message"])){
            $item = $feed->createNewItem();
            $item->setTitle($entry["from"]["name"]);
            $item->setDate($entry["updated_time"]);
            $item->setDescription($entry["message"]);
            if(isset($entry["link"]))
                $item->setLink(htmlentities($entry["link"]));

            $feed->addItem($item);
        }
}

// that's it... don't echo anything else, just call this method
$feed->genarateFeed();

來(lái)自未來(lái)的筆記(2013-07-09):不要再聽(tīng)我的回答了.它老了.Facebook 有一個(gè)新的 API,它的查詢(xún)語(yǔ)言有新的特性,所以不要費(fèi)心拉提要.嘗試以更有趣、更智能的方式使用他們的 API :)

Note from the future (2013-07-09): Don't listen to my answer anymore. It's old. Facebook has a new API with new features on its query language so don't bother pulling feeds. Try to use their API in a more fun, intelligent way :)

這篇關(guān)于Facebook 取消了公共 RSS 提要;如何使用新的時(shí)間線獲取 Facebook 頁(yè)面 RSS?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個(gè)表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設(shè)置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數(shù)組自動(dòng)填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產(chǎn)生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱(chēng) ASC)
主站蜘蛛池模板: 国产一区不卡 | 夜夜夜久久 | 1000部精品久久久久久久久 | 亚洲免费视频一区 | 亚洲精品一区二区三区中文字幕 | 成人a网| 久久综合伊人一区二区三 | 欧美午夜精品 | 日日摸日日添日日躁av | 欧美无乱码久久久免费午夜一区 | 色888www视频在线观看 | 高清色| 岛国视频 | 精品国产视频 | 国产日韩一区二区三区 | 日韩精品一区二区三区 | 在线看黄免费 | 91精品久久久久久久久久 | 日本三级全黄三级三级三级口周 | 国产成人免费 | 久久一区视频 | 国产 日韩 欧美 在线 | 亚洲精品永久免费 | 亚洲一区国产精品 | 四虎影视在线 | 一区二区三区四区av | 欧美黄色一区 | 天天操天天干天天爽 | jizz视频| 亚洲天堂免费 | 99精品九九 | 成人午夜影院 | 在线观看 亚洲 | 欧美精品免费观看二区 | 久久久久国产 | 日韩三级精品 | 久久99久久99久久 | 日韩免费高清视频 | 成人国产毛片 | 中文字幕在线剧情 | 国产精品一区二区三区四区 |