Facebook RSS 订阅已停止工作

Facebook RSS feeds have stopped working

我们在我们的网站上显示来自 Facebook 的提要。直到昨天,我们才能够使用下面的 URL 以 JSON 格式检索提要:

https://www.facebook.com/feeds/page.php?format=json&id=[id_of_the_page]

但是今天我发现link坏了。是否有损坏的原因?

有没有一种方法可以让我使用新图表 API 访问我页面的 JSON 提要?

查看变更日志。 https://developers.facebook.com/docs/apps/changelog

90-day deprecations (effective Wednesday, January 28, 2015).

The Pages JSON feed (e.g. https://www.facebook.com/feeds/page.php?id=%2019292868552&format=json) is now deprecated and will stop returning data from Jan 28, 2015 onwards. Developers should instead call the feed edge on the Graph API's Page object: /v2.2/{page_id}/feed.

以及来自 Facebook 团队的公告。 https://developers.facebook.com/bugs/1539780319626180/

Firstly, I want to apologise. Due to a bug the Page RSS feed was removed yesterday in addition to the Page JSON feed.

We are restoring the Page RSS feed immediately. The fix should be deployed in the next 24 hours and I'll let you know as soon as the RSS feed is functional again.

Please note that we will be deprecating the Page RSS feed in the first half of this year. We'll announce a 90 day breaking change as we did for the Page JSON feed.

The reason we're deprecating the feeds is due to a lack of usage (versus the Graph API Page feed). We have decided to focus our efforts on adding features to and improving the quality of the Graph API Page feed endpoint.

我终于能够在我的网站上获得 Facebook 页面反馈。这是我恢复提要所遵循的步骤:

第 1 步:我登录到 Facebook 开发人员门户并创建了新的 Facebook 应用程序(网站)。您可以从以下 link 找到有关如何创建 Facebook 应用程序的详细信息:How to Create Facebook App

在新创建的应用程序中,您会找到 "App ID" 和 "App Secret" 值。

第 2 步:在我的网站上,我使用 "App ID" 和 "App Secret" 从 Facebook 检索 "access_token"。我用的是C#,所以我用的代码行是:

string access_token = "";
try {
    access_token = webClient.DownloadString("https://graph.facebook.com/oauth/access_token?client_id=616255239999&client_secret=989898989898acec7c3aabbccddf84b66&grant_type=client_credentials");  
}
catch {}

将客户端 ID 替换为应用程序 ID,将客户端密码替换为从上一步复制的应用程序密码值。如果值正确,您将收到如下响应:

access_token=616255878567492343|UYgAYWXYztpFGRawnZ2VlTE

第 3 步:现在使用从上一阶段检索到的访问令牌调用 Facebook Graph API 以获取提要:

string facebookjson = webClient.DownloadString("https://graph.facebook.com/v2.2/1730999949494/feed?access_token=616255878567492343|UYgAYWXYztpFGRawnZ2VlTE");

URL 的构造如下:

https://graph.facebook.com/v2.2/[your_facebook_page_id]/feed?access_token=[your_access_token_value]

瞧!您在 JSON 响应中从您的 Facebook 页面获取提要。