Getting fb comments plugin content using graph api












0















I need to fetch fb comments plugin content from server side. There was a few related questions before, but I still cannot find a workable solution.



Official fb doc is here: https://developers.facebook.com/docs/plugins/faqs#faq_1603507626630008 But api version 2.6 is outdated and there is no og_object.comments field anymore.



Facebook Comments on your website via Graph API instead of Comments plugin? - this way also does not work for me. I get an error message Tried accessing nonexisting field (comments) on node type (URL). Looks like this method is outdated as well.



I found a modern way here Getting comments for a url via facebook graph api and here How to fetch comments with Facebook Graph API from comments plugin .



For example I need to fetch comments for this article: http://diply.com/1301/24-pics-that-haters-will-say-are-photoshopped#2
I can fetch og object id via ?fields=og_object&id=http%3A%2F%2Fsocial.diply.com%2F1301%2F24-pics-that-haters-will-say-are-photoshopped%233, but I always get empty result for /2037050239696956/comments.



I inspected widget content and I found that proper object id is 1767557016664245 and I actually can fetch comments via /1767557016664245/comments.



Why there are different ids? And how can I get a proper id by url?










share|improve this question























  • Facebook’s Open Graph does not treat URLs that only differ in the hash part as different URLs. (The comments plugin however seems to associate the comments with whatever URL you point it to.) This should have been set up using proper distinctive URLs in the first place; not sure if this is still salvageable now without loosing the existing comments.

    – misorude
    Jan 7 at 9:54


















0















I need to fetch fb comments plugin content from server side. There was a few related questions before, but I still cannot find a workable solution.



Official fb doc is here: https://developers.facebook.com/docs/plugins/faqs#faq_1603507626630008 But api version 2.6 is outdated and there is no og_object.comments field anymore.



Facebook Comments on your website via Graph API instead of Comments plugin? - this way also does not work for me. I get an error message Tried accessing nonexisting field (comments) on node type (URL). Looks like this method is outdated as well.



I found a modern way here Getting comments for a url via facebook graph api and here How to fetch comments with Facebook Graph API from comments plugin .



For example I need to fetch comments for this article: http://diply.com/1301/24-pics-that-haters-will-say-are-photoshopped#2
I can fetch og object id via ?fields=og_object&id=http%3A%2F%2Fsocial.diply.com%2F1301%2F24-pics-that-haters-will-say-are-photoshopped%233, but I always get empty result for /2037050239696956/comments.



I inspected widget content and I found that proper object id is 1767557016664245 and I actually can fetch comments via /1767557016664245/comments.



Why there are different ids? And how can I get a proper id by url?










share|improve this question























  • Facebook’s Open Graph does not treat URLs that only differ in the hash part as different URLs. (The comments plugin however seems to associate the comments with whatever URL you point it to.) This should have been set up using proper distinctive URLs in the first place; not sure if this is still salvageable now without loosing the existing comments.

    – misorude
    Jan 7 at 9:54
















0












0








0








I need to fetch fb comments plugin content from server side. There was a few related questions before, but I still cannot find a workable solution.



Official fb doc is here: https://developers.facebook.com/docs/plugins/faqs#faq_1603507626630008 But api version 2.6 is outdated and there is no og_object.comments field anymore.



Facebook Comments on your website via Graph API instead of Comments plugin? - this way also does not work for me. I get an error message Tried accessing nonexisting field (comments) on node type (URL). Looks like this method is outdated as well.



I found a modern way here Getting comments for a url via facebook graph api and here How to fetch comments with Facebook Graph API from comments plugin .



For example I need to fetch comments for this article: http://diply.com/1301/24-pics-that-haters-will-say-are-photoshopped#2
I can fetch og object id via ?fields=og_object&id=http%3A%2F%2Fsocial.diply.com%2F1301%2F24-pics-that-haters-will-say-are-photoshopped%233, but I always get empty result for /2037050239696956/comments.



I inspected widget content and I found that proper object id is 1767557016664245 and I actually can fetch comments via /1767557016664245/comments.



Why there are different ids? And how can I get a proper id by url?










share|improve this question














I need to fetch fb comments plugin content from server side. There was a few related questions before, but I still cannot find a workable solution.



Official fb doc is here: https://developers.facebook.com/docs/plugins/faqs#faq_1603507626630008 But api version 2.6 is outdated and there is no og_object.comments field anymore.



Facebook Comments on your website via Graph API instead of Comments plugin? - this way also does not work for me. I get an error message Tried accessing nonexisting field (comments) on node type (URL). Looks like this method is outdated as well.



I found a modern way here Getting comments for a url via facebook graph api and here How to fetch comments with Facebook Graph API from comments plugin .



For example I need to fetch comments for this article: http://diply.com/1301/24-pics-that-haters-will-say-are-photoshopped#2
I can fetch og object id via ?fields=og_object&id=http%3A%2F%2Fsocial.diply.com%2F1301%2F24-pics-that-haters-will-say-are-photoshopped%233, but I always get empty result for /2037050239696956/comments.



I inspected widget content and I found that proper object id is 1767557016664245 and I actually can fetch comments via /1767557016664245/comments.



Why there are different ids? And how can I get a proper id by url?







facebook-graph-api facebook-social-plugins






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 2 at 13:54









GrigoryGrigory

82




82













  • Facebook’s Open Graph does not treat URLs that only differ in the hash part as different URLs. (The comments plugin however seems to associate the comments with whatever URL you point it to.) This should have been set up using proper distinctive URLs in the first place; not sure if this is still salvageable now without loosing the existing comments.

    – misorude
    Jan 7 at 9:54





















  • Facebook’s Open Graph does not treat URLs that only differ in the hash part as different URLs. (The comments plugin however seems to associate the comments with whatever URL you point it to.) This should have been set up using proper distinctive URLs in the first place; not sure if this is still salvageable now without loosing the existing comments.

    – misorude
    Jan 7 at 9:54



















Facebook’s Open Graph does not treat URLs that only differ in the hash part as different URLs. (The comments plugin however seems to associate the comments with whatever URL you point it to.) This should have been set up using proper distinctive URLs in the first place; not sure if this is still salvageable now without loosing the existing comments.

– misorude
Jan 7 at 9:54







Facebook’s Open Graph does not treat URLs that only differ in the hash part as different URLs. (The comments plugin however seems to associate the comments with whatever URL you point it to.) This should have been set up using proper distinctive URLs in the first place; not sure if this is still salvageable now without loosing the existing comments.

– misorude
Jan 7 at 9:54














0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54007587%2fgetting-fb-comments-plugin-content-using-graph-api%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54007587%2fgetting-fb-comments-plugin-content-using-graph-api%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

A Topological Invariant for $pi_3(U(n))$