{"id":6825,"date":"2014-04-23T08:10:07","date_gmt":"2014-04-23T08:10:07","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/23\/fatal-error-with-fb-init-uncaught-oauthexception-error-validating-access-token-collection-of-common-programming-errors\/"},"modified":"2014-04-23T08:10:07","modified_gmt":"2014-04-23T08:10:07","slug":"fatal-error-with-fb-init-uncaught-oauthexception-error-validating-access-token-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/23\/fatal-error-with-fb-init-uncaught-oauthexception-error-validating-access-token-collection-of-common-programming-errors\/","title":{"rendered":"Fatal error with FB.init: Uncaught OAuthException: Error validating access token-Collection of common programming errors"},"content":{"rendered":"<p>I have added like button to my application page:<\/p>\n<pre><code>\n\n  window.fbAsyncInit = function() {\n    FB.init({appId: 'xxxxx', status: true, cookie: true,\n             xfbml: true});\n  };\n  (function() {\n    var e = document.createElement('script'); e.async = true;\n    e.src = document.location.protocol +\n      '\/\/connect.facebook.net\/en_US\/all.js';\n    document.getElementById('fb-root').appendChild(e);\n  }());\n\n\n<\/code><\/pre>\n<p>With first reaload every thing is ok. After 2-3 page reload I have this error:<\/p>\n<pre><code>Uncaught OAuthException: Error validating access token. thrown\n<\/code><\/pre>\n<p>What is wrong with this? I have searched in stackoverflow but couldnot find any result. (only one)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have added like button to my application page: window.fbAsyncInit = function() { FB.init({appId: &#8216;xxxxx&#8217;, status: true, cookie: true, xfbml: true}); }; (function() { var e = document.createElement(&#8216;script&#8217;); e.async = true; e.src = document.location.protocol + &#8216;\/\/connect.facebook.net\/en_US\/all.js&#8217;; document.getElementById(&#8216;fb-root&#8217;).appendChild(e); }()); With first reaload every thing is ok. After 2-3 page reload I have this error: Uncaught OAuthException: [&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-6825","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6825","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=6825"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6825\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}