{"id":44,"date":"2008-03-29T20:47:12","date_gmt":"2008-03-30T03:47:12","guid":{"rendered":"http:\/\/shanelabs.com\/blog2\/?p=44"},"modified":"2011-11-07T20:53:40","modified_gmt":"2011-11-08T04:53:40","slug":"setfbml-invalid-parameter-exception-facebook-api","status":"publish","type":"post","link":"https:\/\/shanelabs.com\/blog\/2008\/03\/29\/setfbml-invalid-parameter-exception-facebook-api\/","title":{"rendered":"SetFBML invalid parameter exception &#8211; Facebook API"},"content":{"rendered":"<p>In developing\u00a0<a href=\"http:\/\/www.shanelabs.com\/easyexport\/\">Easy Export<\/a>, I\u00a0created a cron script that updates the user\u2019s fbml on their profile page periodically. It worked great, but after some time I started getting the following execption thrown:<\/p>\n<blockquote><p><code>\u00a0'Invalid parameter', on line 1520 in facebookapi_php5_restlib.php<\/code><\/p><\/blockquote>\n<p>After looking into it, I realized it\u2019s because I was trying to set the fbml on a user who previously had the application installed, but had since removed it. So to fix it, you can either ignore the error (empty try\/catch block around setFBML) or check whether the user has the application added before trying to make this call &#8211; via users_getInfo( $user_id, \u2018has_added_app\u2019 )<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In developing\u00a0Easy Export, I\u00a0created a cron script that updates the user\u2019s fbml on their profile page periodically. It worked great, but after some time I started getting the following execption thrown: \u00a0&#8216;Invalid parameter&#8217;, on line 1520 in facebookapi_php5_restlib.php After looking into it, I realized it\u2019s because I was trying to set the fbml on a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-software"],"_links":{"self":[{"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/comments?post=44"}],"version-history":[{"count":5,"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/posts\/44\/revisions"}],"predecessor-version":[{"id":57,"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/posts\/44\/revisions\/57"}],"wp:attachment":[{"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/media?parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/categories?post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/tags?post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}