{"id":1463,"date":"2022-08-30T15:16:44","date_gmt":"2022-08-30T15:16:44","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/19\/facebook-fql-query-fails-with-january-2013-update-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:16:44","modified_gmt":"2022-08-30T15:16:44","slug":"facebook-fql-query-fails-with-january-2013-update-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/facebook-fql-query-fails-with-january-2013-update-collection-of-common-programming-errors\/","title":{"rendered":"Facebook FQL query fails with January 2013 update-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m trying to update an app to work with &#8216;January 2013 Breaking Changes&#8217; enabled, and it looks likes part of the update is breaking my app. The update says &#8220;When getting stats about a URL from the link_stat FQL table&#8230; we will now use the canonicalized URL to fetch those stats.&#8221;<\/p>\n<p>I have this in the head tags, which is what I thought determined the canonical URL:<\/p>\n<pre><code>\n<\/code><\/pre>\n<p>When I comment on one of my pages with the comments plugin, the callback runs this:<\/p>\n<pre><code>FB.Event.subscribe('comment.create',\n    function(response) {\n        var commentsQuery = FB.Data.query(\"SELECT comments_fbid FROM link_stat WHERE url='\"+response.href+\"'\");\n        console.log( 'commentsfbidQuery: ' + commentsfbidQuery.value[0].comments_fbid );\n    }\n);\n<\/code><\/pre>\n<p>With the update enabled, what I see in the console is: &#8220;Uncaught TypeError: Cannot read property &#8216;0&#8217; of undefined,&#8221; ie, the query isn&#8217;t returning anything. When I disable the update, it works again.<\/p>\n<p>Been banging my head against this for a while, any insight hugely appreciated. January 9 is nigh \ud83d\ude42<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-19 13:18:21. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to update an app to work with &#8216;January 2013 Breaking Changes&#8217; enabled, and it looks likes part of the update is breaking my app. The update says &#8220;When getting stats about a URL from the link_stat FQL table&#8230; we will now use the canonicalized URL to fetch those stats.&#8221; I have this in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1463","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1463"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1463\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}