", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T14:55:59.442+00:00" }, { "@type": "Comment", "text": "but the problem is is that the 2 scripts are not functional due to toddle's reset CSS", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T14:57:03.991+00:00", "image": "https://discord-api.toddle.workers.dev/api/attachments/1265292303220740137/1265321792717979788/Screenshot_2024-07-23_at_17.56.34.png" }, { "@type": "Comment", "text": "Great energy ! Your continuous contribution to the toddle Community just made you advance to Community Level 3!", "author": { "@type": "Person", "name": "Unknown", "image": "https://cdn.discordapp.com/avatars/1113450435244740608/20fb208d321245fa82276d8c05d329d8", "url": "https://discordapp.com/users/1113450435244740608" }, "datePublished": "2024-07-23T14:57:04.727+00:00" }, { "@type": "Comment", "text": "I know that to prevent Toddle from doing this, i can do \"data-unset-toddle-styles\"", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T14:57:43.311+00:00" }, { "@type": "Comment", "text": "https://docs.nordcraft.com", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T14:57:48.153+00:00" }, { "@type": "Comment", "text": "but I dont understand how to do it", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T14:58:09.342+00:00" }, { "@type": "Comment", "text": "That is not correct. reset CSS does not interfer with scripts", "author": { "@type": "Person", "name": "Max", "image": "https://cdn.discordapp.com/avatars/1153712505722515476/97af79ff12d7a02c01a74d71bad259c9", "url": "https://discordapp.com/users/1153712505722515476" }, "datePublished": "2024-07-23T14:59:38.627+00:00" }, { "@type": "Comment", "text": "that is what i mean by \"greyed out\"", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:00:26.108+00:00", "image": "https://discord-api.toddle.workers.dev/api/attachments/1265292303220740137/1265322640445542410/Screenshot_2024-07-23_at_17.59.38.png" }, { "@type": "Comment", "text": "the scripts aren't actually in the HTML and that is why the onSignInSuccess() callback is not working", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:00:56.225+00:00" }, { "@type": "Comment", "text": "Yes. But those are just grayed out, because those are things that are not displayed. They are in the HTML.", "author": { "@type": "Person", "name": "Max", "image": "https://cdn.discordapp.com/avatars/1153712505722515476/97af79ff12d7a02c01a74d71bad259c9", "url": "https://discordapp.com/users/1153712505722515476" }, "datePublished": "2024-07-23T15:01:32.084+00:00" }, { "@type": "Comment", "text": "that is how the HTML looks like", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:01:34.814+00:00", "image": "https://discord-api.toddle.workers.dev/api/attachments/1265292303220740137/1265322928858202182/Screenshot_2024-07-23_at_18.01.21_2.png" }, { "@type": "Comment", "text": "let me make a screen recording", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:02:34.872+00:00" }, { "@type": "Comment", "text": "the video and the code i use", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:07:21.63+00:00" }, { "@type": "Comment", "text": "Where do you have that info from? Very sure that this does not work. Everything is fine with the code. You can loose all the data-attribute things that you tried. The problem is that you don't actually do anything with the data from Neynar. I have never seen the toddle.actions...", "author": { "@type": "Person", "name": "Max", "image": "https://cdn.discordapp.com/avatars/1153712505722515476/97af79ff12d7a02c01a74d71bad259c9", "url": "https://discordapp.com/users/1153712505722515476" }, "datePublished": "2024-07-23T15:11:10.812+00:00", "image": "https://discord-api.toddle.workers.dev/api/attachments/1265292303220740137/1265325344567857183/image.png" }, { "@type": "Comment", "text": "toddle chatGPT? it doesn't work anyway because nothing gets logged in the console", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:13:54.998+00:00" }, { "@type": "Comment", "text": "i tried it without the toddle.actions.setToSessionStorage.handler and didnt work still", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:14:26.321+00:00" }, { "@type": "Comment", "text": "I haven't seen that action either. It could be possible that the AI bugged out OR it is undocumented and the toddle team could confirm it exists", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:17:18.799+00:00" }, { "@type": "Comment", "text": "this is the docs", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:17:18.991+00:00", "image": "https://discord-api.toddle.workers.dev/api/attachments/1265292303220740137/1265326888784756766/Screenshot_2024-07-23_at_18.17.07.png" }, { "@type": "Comment", "text": "If it does exist", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:17:21.678+00:00" }, { "@type": "Comment", "text": "This should be used as a custom action probably, not a page script tag", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:17:32.189+00:00" }, { "@type": "Comment", "text": "I don't think toddle can access the data properly if it's just being done via script tag", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:17:55.908+00:00" }, { "@type": "Comment", "text": "I think what the gpt meant by it was to use the actual built-in toddle action", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:18:19.463+00:00" }, { "@type": "Comment", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:18:29.996+00:00" }, { "@type": "Comment", "text": "Which is different in how you'd be able to use it", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:18:38.343+00:00" }, { "@type": "Comment", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:19:24.191+00:00" }, { "@type": "Comment", "text": "That's the JS for what you're trying to do", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:19:30.235+00:00" }, { "@type": "Comment", "text": "I'd replace the toddle line with that if you want to go the JS route", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:19:42.576+00:00" }, { "@type": "Comment", "text": "so if i make a custom action with actual code, i cant use the toddle action construnctor", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:19:58.468+00:00" }, { "@type": "Comment", "text": "Great energy ! Your continuous contribution to the toddle Community just made you advance to Community Level 4!", "author": { "@type": "Person", "name": "Unknown", "image": "https://cdn.discordapp.com/avatars/1113450435244740608/20fb208d321245fa82276d8c05d329d8", "url": "https://discordapp.com/users/1113450435244740608" }, "datePublished": "2024-07-23T15:19:58.831+00:00" }, { "@type": "Comment", "text": "Opposite, custom actions give you access to toddle actions", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:20:21.465+00:00" }, { "@type": "Comment", "text": "That said", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:20:26.741+00:00" }, { "@type": "Comment", "text": "Try your snippet with what I just put", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:20:33.966+00:00" }, { "@type": "Comment", "text": "yeah but they wipe all the written code", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:20:34.753+00:00" }, { "@type": "Comment", "text": "What do you mean wipe the code?", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:20:48.537+00:00" }, { "@type": "Comment", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:21:45.656+00:00" }, { "@type": "Comment", "text": "function onSignInSuccess(data) { console.log(\"Sign-in success with data:\", data); sessionStorage.setItem(key, value); }", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:22:33.491+00:00" }, { "@type": "Comment", "text": "If you're just using JS, that would be the way", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:22:45.521+00:00" }, { "@type": "Comment", "text": "Ah no, the convert to toddle action is something different", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:23:29.475+00:00" }, { "@type": "Comment", "text": "That's if you want to make a global function using toddle's nodes", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:23:46.079+00:00" }, { "@type": "Comment", "text": "Not that it actually converts code to nodes", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:24:15.612+00:00" }, { "@type": "Comment", "text": "thank you! should i trigger the action when a user clicks on the button?", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:46:29.875+00:00" }, { "@type": "Comment", "text": "That would still be part of the script you linked", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:47:40.921+00:00" }, { "@type": "Comment", "text": "still is not working", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:54:33.232+00:00" }, { "@type": "Comment", "text": "nothing happens and the script code is greyed out", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T15:54:56.391+00:00" }, { "@type": "Comment", "text": "The script code being greyed out is not an issue as Max pointed out", "author": { "@type": "Person", "name": "Lucas G", "image": "https://cdn.discordapp.com/avatars/128651941143117824/d1f89232c7f5c290a254ee62ab3b26a9", "url": "https://discordapp.com/users/128651941143117824" }, "datePublished": "2024-07-23T15:57:12.58+00:00" }, { "@type": "Comment", "text": "I'll make a demo project", "author": { "@type": "Person", "name": "Max", "image": "https://cdn.discordapp.com/avatars/1153712505722515476/97af79ff12d7a02c01a74d71bad259c9", "url": "https://discordapp.com/users/1153712505722515476" }, "datePublished": "2024-07-23T16:15:59.75+00:00" }, { "@type": "Comment", "text": "thank you Max", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T16:26:31.034+00:00" }, { "@type": "Comment", "text": "Hey ! I created a demo project for this. The issue is, as Lucas pointed out, that you don't actually do anything with the data received from Neynar. You don't save it to a variable that can be accessed in Toddle. I removed the scripts and created a custom action. This action (initNeynar). This action is called on load and creates the button. The only difference is that you have a callback \"On success\" now, that can trigger things in Toddle (1). Here, I store the data from Neynar in \"neynarData\" (2). But is up to you, what you do with it. Hope this helps. Cannot test it as I don't have an account https://editor.nordcraft.com/projects/neynar/branches/start/components/HomePage?mode=design&leftpanel=design&rightpanel=attributes&canvas-width=800&canvas-height=800", "author": { "@type": "Person", "name": "Max", "image": "https://cdn.discordapp.com/avatars/1153712505722515476/97af79ff12d7a02c01a74d71bad259c9", "url": "https://discordapp.com/users/1153712505722515476" }, "datePublished": "2024-07-23T16:40:36.174+00:00", "image": "https://discord-api.toddle.workers.dev/api/attachments/1265292303220740137/1265347848921419909/image.png" }, { "@type": "Comment", "text": "thank you! will try it asap", "author": { "@type": "Person", "name": "viseriesdba", "image": "https://ia800305.us.archive.org/31/items/discordprofilepictures/discordblue.png", "url": "https://discordapp.com/users/1062072025658699886" }, "datePublished": "2024-07-23T16:43:52.441+00:00" } ], "text": "So i am trying to use the \"script\" element in Toddle, but when i inspect the page the script that I've added is greyed out. What could be the reason?" }
PricingBlog

Add scripts to body?

  • viseriesdba-1265292303220740137

    viseriesdba

    1 year ago

    So i am trying to use the "script" element in Toddle, but when i inspect the page the script that I've added is greyed out. What could be the reason?
  • max.kayr-1265318252545052786

    Max

    1 year ago

    Hey! I am guessing you use the Safari dev tools. All elements that are not actually visible will be grayed out. But they still work
  • Can you show what you want to accomplish?
  • viseriesdba-1265321522252484760

    viseriesdba

    1 year ago

    hi! so i'm trying to implement this "Sign in with Farcaster" button - https://docs.neynar.com/docs/how-to-let-users-connect-farcaster-accounts-with-write-access-for-free-using-sign-in-with-neynar-siwn

    it asks me to paste this code into the <body>

    <html>
    <body>
    <div
    class="neynar_signin"
    data-client_id="YOUR_NEYNAR_CLIENT_ID"
    data-success-callback="onSignInSuccess"
    data-theme="dark"> <!-- defaults to light, unless specified -->
    </div>
    <script src="https://neynarxyz.github.io/siwn/raw/1.2.0/index.js" async></script>
    <script>
    // Define the onSignInSuccess callback function
    function onSignInSuccess(data) {
    console.log("Sign-in success with data:", data);
    // Your code to handle the sign-in data
    }
    </script>
    </body>
    </html>
  • viseriesdba-1265321792990478366

    viseriesdba

    1 year ago

    but the problem is is that the 2 scripts are not functional due to toddle's reset CSS
    1265321792717979788-Screenshot_2024-07-23_at_17.56.34.png
  • Tod-1265321796077486101

    Tod

    1 year ago

    Great energy @viseriesdba! Your continuous contribution to the toddle Community just made you advance to Community Level 3!
  • viseriesdba-1265321957910515825

    viseriesdba

    1 year ago

    I know that to prevent Toddle from doing this, i can do "data-unset-toddle-styles"
  • but I dont understand how to do it
  • max.kayr-1265322441581002832

    Max

    1 year ago

    That is not correct. reset CSS does not interfer with scripts
  • viseriesdba-1265322640730619934

    viseriesdba

    1 year ago

    that is what i mean by "greyed out"
    1265322640445542410-Screenshot_2024-07-23_at_17.59.38.png
  • the scripts aren't actually in the HTML and that is why the onSignInSuccess() callback is not working
  • max.kayr-1265322917453893768

    Max

    1 year ago

    Yes. But those are just grayed out, because those are things that are not displayed. They are in the HTML.
  • viseriesdba-1265322928904605748

    viseriesdba

    1 year ago

    that is how the HTML looks like
    1265322928858202182-Screenshot_2024-07-23_at_18.01.21_2.png
  • viseriesdba-1265323180805984356

    viseriesdba

    1 year ago

    let me make a screen recording
  • viseriesdba-1265324383556341780

    viseriesdba

    1 year ago

    the video and the code i use
    1265324383153426555-Screenshot_2024-07-23_at_18.05.45.png
  • max.kayr-1265325344815185940

    Max

    1 year ago

    Where do you have that info from? Very sure that this does not work. Everything is fine with the code. You can loose all the data-attribute things that you tried. The problem is that you don't actually do anything with the data from Neynar. I have never seen the toddle.actions...
    1265325344567857183-image.png
  • viseriesdba-1265326033461317693

    viseriesdba

    1 year ago

    toddle chatGPT? it doesn't work anyway because nothing gets logged in the console
  • i tried it without the toddle.actions.setToSessionStorage.handler and didnt work still
  • lucasg-1265326888264400916

    Lucas G

    1 year ago

    I haven't seen that action either. It could be possible that the AI bugged out OR it is undocumented and the toddle team could confirm it exists
  • viseriesdba-1265326889069973605

    viseriesdba

    1 year ago

    this is the docs
    1265326888784756766-Screenshot_2024-07-23_at_18.17.07.png
    1265326889128562769-Screenshot_2024-07-23_at_18.17.13.png
  • lucasg-1265326900339802122

    Lucas G

    1 year ago

    If it does exist
  • This should be used as a custom action probably, not a page script tag
  • I don't think toddle can access the data properly if it's just being done via script tag
  • I think what the gpt meant by it was to use the actual built-in toddle action
  • Save to Session Storage
  • Which is different in how you'd be able to use it
  • sessionStorage.setItem(key, value);
  • That's the JS for what you're trying to do
  • I'd replace the toddle line with that if you want to go the JS route
  • viseriesdba-1265327557964988479

    viseriesdba

    1 year ago

    so if i make a custom action with actual code, i cant use the toddle action construnctor
  • Tod-1265327559487389799

    Tod

    1 year ago

    Great energy @viseriesdba! Your continuous contribution to the toddle Community just made you advance to Community Level 4!
  • lucasg-1265327654421135371

    Lucas G

    1 year ago

    Opposite, custom actions give you access to toddle actions
  • That said
  • Try your snippet with what I just put
  • viseriesdba-1265327710155047147

    viseriesdba

    1 year ago

    yeah but they wipe all the written code
  • lucasg-1265327767969333270

    Lucas G

    1 year ago

    What do you mean wipe the code?
  • viseriesdba-1265328007543783434

    viseriesdba

    1 year ago

  • lucasg-1265328208178581614

    Lucas G

    1 year ago

    function onSignInSuccess(data) {
    console.log("Sign-in success with data:", data);
    sessionStorage.setItem(key, value);
    }
  • If you're just using JS, that would be the way
  • Ah no, the convert to toddle action is something different
  • That's if you want to make a global function using toddle's nodes
  • Not that it actually converts code to nodes
  • viseriesdba-1265334232809476106

    viseriesdba

    1 year ago

    thank you! should i trigger the action when a user clicks on the button?
  • lucasg-1265334530798125076

    Lucas G

    1 year ago

    That would still be part of the script you linked
  • viseriesdba-1265336260155936848

    viseriesdba

    1 year ago

    still is not working
  • nothing happens and the script code is greyed out
  • lucasg-1265336928509886474

    Lucas G

    1 year ago

    The script code being greyed out is not an issue as Max pointed out
  • max.kayr-1265341656203526244

    Max

    1 year ago

    I'll make a demo project
  • viseriesdba-1265344304000536606

    viseriesdba

    1 year ago

    thank you Max
  • max.kayr-1265347848774483968

    Max

    1 year ago

    Hey @viseriesdba! I created a demo project for this. The issue is, as Lucas pointed out, that you don't actually do anything with the data received from Neynar. You don't save it to a variable that can be accessed in Toddle. I removed the scripts and created a custom action. This action (initNeynar). This action is called on load and creates the button. The only difference is that you have a callback "On success" now, that can trigger things in Toddle (1). Here, I store the data from Neynar in "neynarData" (2). But is up to you, what you do with it. Hope this helps. Cannot test it as I don't have an account 😉

    https://editor.nordcraft.com/projects/neynar/branches/start/components/HomePage?mode=design&leftpanel=design&rightpanel=attributes&canvas-width=800&canvas-height=800
    1265347848921419909-image.png
    1265347849227341885-image.png
    1265347849625931889-image.png
    1265347849873526958-image.png
  • viseriesdba-1265348671977820312

    viseriesdba

    1 year ago

    thank you! will try it asap