Created
January 18, 2017 00:06
-
-
Save spasiu/7cf5e078151b83b6a6c6edef9dbab284 to your computer and use it in GitHub Desktop.
Example of an embedded Smooch Web Messenger instance that opens in full width, and sends an initial message
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| <style> | |
| .sk-msg, .sk-msg-image { | |
| font-size: 18px !important; | |
| max-width: 350px !important; | |
| } | |
| .sk-from { | |
| font-size: 18px !important; | |
| } | |
| .sk-msg-avatar { | |
| width: 50px !important; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div id="conversation"></div> | |
| <script src="https://cdn.smooch.io/smooch.min.js"></script> | |
| <script> | |
| Smooch.init({ | |
| appToken: 'YOUR_APP_TOKEN', | |
| userId: 'YOUR_USER_ID', | |
| embedded: true | |
| }).then(() => { | |
| Smooch.sendMessage('HI!') | |
| Smooch.render(document.getElementById('conversation')); | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment