Created
January 5, 2012 20:50
-
-
Save nambrot/1567216 to your computer and use it in GitHub Desktop.
public/app
This file contains hidden or 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
var bootstrap = { | |
loginSuccessful: function() { | |
FB.api('/me', function (resp) { | |
userid = resp.id; | |
}); | |
$('#message').text("Successfully logged in.").addClass('animated fadeIn'); | |
a = new A(); | |
// Start it motherfuckers | |
Backbone.history.start({pushState: true}) | |
}, | |
notLoggedInYet: function() { | |
$('#message').html("Welcome to the " + name +". Please <span id='loginbutton''>login</span> to use. While this application asks for a lot of permissions, I swear it won't be misused. In fact, there are no calls to my server beyond this point, just to Facebook's Graph API. You can find the source code of this application on <a href='https://github.com/nambrot/Facebook-Photo-Browser>Github</a> ").addClass('animated fadeIn'); | |
$('#loginbutton').click(_.bind(this.login, this)); | |
}, | |
login: function() { | |
FB.login(function(response){},{scope: 'user_videos, friends_videos, user_photos, friends_photos, read_stream, friends_photos, friends_photo_video_tags, user_location,user_about_me,friends_about_me,friends_location, friends_website, user_website, user_birthday, friends_birthday, user_education_history, friends_education_history, user_hometown, friends_hometown, user_online_presence, friends_online_presence'}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment