• 0
Sign in to follow this  
Alexandre Sodre

ler dados do java script

Question

olá, estou precisando ler o retorno desse codigo em java, preciso do userid como ler esse codigo e pergar a variaavel em php para que eu possa enviar pra o banco de dados mysql.

preciso pegar essa variavel userid em php.

Não consegui faz varios dias que estou tentando de tudo até agora nada. alguém pode me ajudar por favor. obrigado atodos

 

<script>
OneSignal.push(function() {
  /* These examples are all valid */
  OneSignal.getUserId(function(userId) {
    console.log("OneSignal User ID:", userId);
    // (Output) OneSignal User ID: 270a35cd-4dda-4b3f-b04e-41d7463a2316    
  });
               
  OneSignal.getUserId().then(function(userId) {
    console.log("OneSignal User ID:", userId);
    // (Output) OneSignal User ID: 270a35cd-4dda-4b3f-b04e-41d7463a2316    
  });
});
</script>

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this