Skip to content

Instantly share code, notes, and snippets.

@mrbrdo
Created July 16, 2011 01:33
Show Gist options
  • Save mrbrdo/1085893 to your computer and use it in GitHub Desktop.
Save mrbrdo/1085893 to your computer and use it in GitHub Desktop.
include js file: http://connect.facebook.net/en_US/all.js
// load facebook api
$('<div id="fb-root"></div>').appendTo("body");
FB.init({
appId : '168055643260227',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// post to facebook
var inputText = htmlInputToText($("div.v-J-n-m-Gc").html());
var cb = function(resp) { };
var params = { message: inputText, access_token: fbToken };
//FB.ApiServer.flash('graph', 'me/feed', 'post', FB.JSON.flatten(params), cb);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment