Share on Facebook

<script type=”text/javascript”>
function fbs_click() {
var u = location.href;
var t = document.title;
window.open(‘http://www.facebook.com/sharer.php?u=’+encodeURIComponent(u)+’&t=’+encodeURIComponent(t),’sharer’,’toolbar=0,status=0,width=626,height=436′);
return false;
}
</script>
<a rel=”nofollow” href=”http://www.facebook.com/share.php?u=<url>” onclick=”return fbs_click()” target=”_blank”>Share on Facebook</a>

CurlException: 60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Problem
CurlException: 60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Solution
Adding the following code:
Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYPEER] = false;
Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYHOST] = 2;

“Permission denied” Facebook JS Error on IE8

Error:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; .NET4.0C)
Timestamp: Mon, 13 Dec 2010 14:00:09 UTC

Message: Permission denied
Line: 16
Char: 2188
Code: 0
URI: http://connect.facebook.net/en_US/all.js

Solution:
Add domain param here:
$facebook = new Facebook(array(
‘appId’  => ‘xxx’,
‘secret’ => ‘xxx’,
‘cookie’ => true,
‘domain’ => ‘mydomain.com’
));

FBML Error (line 11): illegal tag “body” under “fb:tab-position”

Errors while loading page from application
Parse errors:
FBML Error (line 11): illegal tag “body” under “fb:tab-position”

If you are using IIS, you may see the above message when you add a tab to your facebook page. It is because IIS doesn’t allow POST requests to html files by default.

Solution 1: Configure your IIS to accept POST requests to html files

Solution 2: Change your .html into .php