Update SDK Versions for Chat and Video

This commit is contained in:
Jeffrey Linwood
2018-09-28 05:51:28 -05:00
parent afa9372657
commit 3ea1eaf402
11 changed files with 307 additions and 268 deletions

View File

@@ -0,0 +1,34 @@
<body>
<script>
window.fbAsyncInit = function() {
FB.init({
appId: "<YOUR-APP-ID>",
xfbml: true,
cookie: true,
version: "v2.8"
});
FB.Event.subscribe('send_to_messenger', function(e) {
console.log("Plug-in reported event: " + e.event);
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) { return; }
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-send-to-messenger"
messenger_app_id="<YOUR-APP-ID>"
page_id="<YOUR-PAGE-ID>"
color="blue"
size="standard">
</div>
</body>

View File

@@ -1,17 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>Hello App! - Notify Quickstart</title>
<link rel="shortcut icon" href="//www.twilio.com/marketing/bundles/marketing/img/favicons/favicon.ico">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="notify.css">
<title>Hello App! - Notify Quickstart</title>
<link rel="shortcut icon" href="//www.twilio.com/marketing/bundles/marketing/img/favicons/favicon.ico">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="notify.css">
</head>
<body>
<header>
<a href="https://www.twilio.com/docs/api/notifications"
target="_blank">
Read the Twilio Notify guide
<i class="fa fa-fw fa-external-link"></i>
<a href="https://www.twilio.com/docs/api/notifications" target="_blank">
Read the Twilio Notify guide<i class="fa fa-fw fa-external-link"></i>
</a>
</header>
@@ -22,14 +20,11 @@
<p/>
<input type="submit" id="sendNotificationButton" value="Send Notification"/>
<div id="message">
Welcome to Notify!
</div>
<div id="message">Welcome to Notify!</div>
<p>After you set up a notification binding, go ahead and send a notification to that identity!</p>
</section>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="notify.js"></script>
</body>

View File

@@ -1,13 +1,12 @@
$(function() {
$('#sendNotificationButton').on('click', function() {
$.post('/send-notification', {
identity: $('#identityInput').val(),
body: "Hello, World!"
}, function(response) {
$('#identityInput').val('');
$('#message').html(response.message);
console.log(response);
});
$('#sendNotificationButton').on('click', function() {
$.post('/send-notification', {
identity: $('#identityInput').val(),
body: "Hello, world!"
}, function(response) {
$('#identityInput').val('');
$('#message').html(response.message);
console.log(response);
});
});
});