Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. FB.api('/me', function(response) {
  2. var fn = ('first_name' in response) ? response.first_name : "null";
  3. var ln = ('last_name' in response) ? response.last_name : "null";
  4. var fid = ('id' in response) ? response.id : "null";
  5. var mail = ('email' in response) ? response.email : "null";
  6. ...
  7. });
  8.  
  9. FB.init({
  10. appId : 'myid',
  11. cookie : true,
  12. xfbml : true,
  13. version : 'v2.8'
  14. });
  15.  
  16. FB.login(function(response) {
  17. if (response.authResponse) {
  18. processLogin(response);
  19. } else {
  20. // user clicked cancel
  21. }
  22. }, {scope: 'public_profile,email'});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement