Skip to content

Instantly share code, notes, and snippets.

@msenkpiel
Created June 20, 2012 08:47
Show Gist options
  • Save msenkpiel/2958864 to your computer and use it in GitHub Desktop.
Save msenkpiel/2958864 to your computer and use it in GitHub Desktop.
Facebook Basic Wall Post
window.fbAsyncInit = function () {
FB.init({
appId:'XXXXXXXXXXXXXXXXXX',
status:true,
cookie:true,
xfbml:true
});
};
(function (d) {
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {
return;
}
js = d.createElement('script');
js.id = id;
js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
function postToFeed(){
// calling the API ...
var obj = {
method: 'feed',
link: '',
name: '',
caption: '',
description: '',
picture: '',
redirect_uri:'https://www.facebook.com/'
};
function callback(response) {}
FB.ui(obj, callback);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment