Skip to content

Instantly share code, notes, and snippets.

View StavrosKen's full-sized avatar

StavrosKen StavrosKen

  • Evalest Ltd
  • Reading, United Kingdom
View GitHub Profile
<div id="Info"></div>
<script>
function getUserInfo() {
FB.api('/me', function (response) {
document.getElementById("Info").innerHTML = "Hello" + response.name + "<br />Link:" + response.link;
userID = response.id;
});
@StavrosKen
StavrosKen / FbLogin.js
Last active January 3, 2016 11:08
FacebookLoginJavascript
FB.login(function (response) {
if (response.authResponse) {
//Place code here to be executed after the login is successful!
} else {
console.log('User cancelled login or did not fully authorize.');
}
}, { scope: 'email,user_photos,user_videos,publish_stream' });
@StavrosKen
StavrosKen / FbSdkInstall.js
Last active January 3, 2016 10:59
Facebook SDK installation
<script>
window.fbAsyncInit = function () {
FB.init({
appId: 'YOUR-APP-ID-HERE',
status: true,
xfbml: true
});
@StavrosKen
StavrosKen / 0_reuse_code.js
Created January 16, 2014 11:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console