This self answer is the result of agonizing over the deprecated facebook sharer url based api, which kept refusing to post the URL I had setup through the sharer URL format. The resultant response was the following no matter what privacy setting I set:
{
"__ar":1,
"error":1367001,
"errorSummary":"Could not post to Wall",
"errorDescription":"The message could not be posted to this Wall.",
"payload":null,
"bootloadable":{},
"ixData":[]
}
My mess of code. (Yes it breaks every convention known to web development and yes I inherited this code.)
<?php
$url = urlencode(Domain::getDomain()."/".$details['urlname']);
$title=urlencode($details['name']);
$summary=$details['name'];
$image=urlencode(constant('BASE_IMAGES').'/'.$details['gallery']['listing'][0]['thumb']['src']);
?>
<a onClick="window.open('http://www.facebook.com/sharer.php?s=100&p[title]=<?php echo $title;?>&p[summary]=<?php echo $summary;?>&p[url]=<?php echo $url; ?>&p[images][0]=<?php echo $image;?>','sharer','toolbar=0,status=0,width=548,height=325'); return false" href="javascript: void(0)"><img src="/site/images/icon-facebook.png" alt="Facebook" border="0"></a>
The official question is as follows: Why does the sharer method of sharing links in facebook result in this error?
For my case, this was because I had not included the fully qualified URL including the protocol. My PHP generated URL was a mess of concatenation and did not include the protocol. After adding it, the post went through.
I had to change the second line listed above to
$url = urlencode('http://'.Domain::getDomain()."/".$details['urlname']);
There could be more reasons why Facebook throws this 1367001 Error
, but this is at least one thing to check.