We’ve got this project going on where users can create their own artwork which is saved to the server as an image, and we want them to be able to post it into Facebook. At first I thought it was going to take some effort and have to use the Facebook Connect API. But I was hoping for something easier, kind of how easy it is on Twitter to just tag a status GET string onto the URL. Then I remembered Facebook recently released something that does exactly this. It’s all very simple and pretty cool really, check it out here.
I’m doing something simple so I didn’t really need the share count. So I threw together a super simple JavaScript implementation:
function fbshare(url,title){
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(url)+'&t='+encodeURIComponent(title),'FacebookShare','toolbar=0,status=0,width=626,height=436');
}
As you can see there’s nothing to it. It’s nice because it sends the user directly to Facebook, and if they are already logged-in then they are instantly presented with the familiar form.
Something to note is that if you are posting a web page then the title will likely be overridden and pulled directly from the page title (just as the page description and thumbnail images). But if you are posting an image or another URL then the title will definitely come in handy.
I came across a 
