Я пытаюсь извлечь информацию из комментариев this page (прокрутите вниз до ** Комментариев подключаемых модулей генератора кода * раздел)Как запросить комментарии к Facebook комментарии комментариев плагина, используя C#?
Я использую FacebookClient
класс от Facebook Nuget package для выборки данных. Мой код выглядит следующим образом:
string oauthUrl = $"https://graph.facebook.com/oauth/access_token?type=client_cred&client_id={appId}&client_secret={appSecret}";
string accessToken = client.DownloadString(oauthUrl).Split('=')[1];
// this is included as a sanity check that the client can fetch data (correct token, proper calls)
var fbClient = new FacebookClient(accessToken);
var fbData = fbClient.Get("/wikipedia/").ToString();
var info = JsonConvert.DeserializeObject<FacebookPageInfo>(fbData);
fbData = fbClient.Get("/wikipedia/posts").ToString();
var posts = JsonConvert.DeserializeObject<FacebookPostData>(fbData);
// this is the code the actually should fetch comments content
// this is the data-href value retrieved from inspecting rendered page
var pageUrl = HttpUtility.UrlDecode("https://developers.facebook.com/docs/plugins/comments#configurator");
var fbComments = fbClient.Get($"/{pageUrl}/comments");
Однако, я только получить результат JSON результат:
{
"og_object": {
"id": "246649445486535",
"description": "The Comments box lets people comment on content on your site using their Facebook profile and shows this activity to their friends in news feed. It also contains built-in moderation tools and special...",
"title": "Comments - Social Plugins - Documentation - Facebook for Developers",
"type": "article",
"updated_time": "2017-02-09T22:53:10+0000"
},
"share": {
"comment_count": 0,
"share_count": 4226
},
"id": "https:\/\/developers.facebook.com\/docs\/plugins\/comments#configurator\/comments"
}
Вопрос: Как я могу получать фактические комментарии содержание?
https://developers.facebook.com/docs/plugins/faqs#faq_1603507626630008 – CBroe