Update SDK Versions for Chat and Video
This commit is contained in:
34
static/notify/facebook_messenger.html
Normal file
34
static/notify/facebook_messenger.html
Normal 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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user