Advertisement
Guest User

Untitled

a guest
Nov 26th, 2015
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local function facebookListener(event)
  2.     if (event.type == "session") then
  3.         if (event.phase == "login") then
  4.             sessionToken = event.token
  5.              facebook.request( "me/invitable_friends")
  6.         elseif (event.type == "request") then
  7.        native.showAlert("Facebook listener", "request")
  8.            if ( not event.isError ) then
  9.             local responseJson = json.decode( event.response )
  10.             native.showAlert("Me Request", responseJson)
  11.         else
  12.         native.showAlert("erro", "erro")
  13.         end
  14.         end
  15.     end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement