I\'m using Node.js:
var s = \'Who\\\'s that girl?\'; var url = \'http://graph.facebook.com/?text=\' + encodeURIComponent(s); request(url, POST, ...)
You can encode the single quote as specified in this link http://www.w3schools.com/TAGS/ref_urlencode.asp