Last active
December 11, 2015 15:18
-
-
Save rutcreate/4619864 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript"> | |
function post() { | |
FB.getLoginStatus(function(response) { | |
FB.ui({ | |
method: 'feed', | |
name: 'Enter name here', // configurable | |
caption: 'Caption here', // configurable | |
description: 'Description', // configurable | |
link: 'http://www.example.com', // configurable | |
picture: 'http://www.example.com/images/test.jpg' // configurable | |
}); | |
}); | |
}; | |
</script> | |
</head> | |
<body> | |
<div id="fb-root"></div> | |
<script type="text/javascript"> | |
// Load the SDK Asynchronously | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId : '418319054897571', // App ID | |
status : true, // check login status | |
cookie : true, // enable cookies to allow the server to access the session | |
xfbml : true // parse XFBML | |
}); | |
}; | |
(function(d, debug){ | |
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" + (debug ? "/debug" : "") + ".js"; | |
ref.parentNode.insertBefore(js, ref); | |
}(document, /*debug*/ false)); | |
</script> | |
<a href="javascript:post()">Post</a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment