Skip to content

Instantly share code, notes, and snippets.

View sansari's full-sized avatar

Salman Ansari sansari

View GitHub Profile
@sansari
sansari / classes_objects_essentials.rb
Last active December 19, 2015 00:49
Classes & Objects Review
# Defining a new class
class Student
end
# Creating an instance of a class
> student = Student.new
> student.class
=> Student
1) The 'perms' parameter has been renamed to 'scope' for FB.login --> FB.login( callback, {scope:'manage_pages'})
2) The function FB.getSession has been renamed to FB.getAuthResponse
3) The structure of the response for FB.login, FB.getLoginStatus and FB.getAuthResponse has changed. response.session is now response.authResponse, and authResponse only contains and accessToken, userId, signedRequest and expiresIn. Please note the name change from access_token to accessToken and user_id to userId.
4) No other information is passed including which permissions have been granted. Another graph call must be made with the access token to get any more information. For example, you may need to make another call to /me to get current permissions, and verify that the permissions include the one you just asked for.