-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·118 lines (89 loc) · 3.59 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php include 'config.php';?>
<!doctype html>
<!-- HTML5 Boilerplate -->
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>fbMobilePaymentsTest - Test mobile payments on iOS</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- For all browsers -->
<link rel="stylesheet" href="css/320andup.css">
<!--[if (lt IE 9) & (!IEMobile)]>
<script src="js/selectivizr-min.js"></script>
<![endif]-->
<!-- JavaScript -->
<script src="js/modernizr-2.5.3-min.js"></script>
<link rel="shortcut icon" href="/favicon.ico">
<meta http-equiv="cleartype" content="on">
</head>
<body class="clearfix">
<div id="fb-root"></div>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.Event.subscribe('auth.statusChange', function(response) {
$('#auth-status span').text(response.status);
if(response.status == "connected"){
FB.api('/me', function(response) {
$('#name span').text(response.name);
});
}
});
// init the FB JS SDK
FB.init({
appId : '<?php echo $appId; ?>', // App ID from the App Dashboard
channelUrl : '<?php echo $channelUrl; ?>', // Channel File for x-domain communication
status : true, // check the login status upon init?
cookie : true, // set sessions cookies to allow your server to access the session?
xfbml : true // parse XFBML tags on this page?
});
// Additional initialization code such as adding Event Listeners goes here
if(FB.UA.nativeApp()){
$('#native-status span').text('native');
} else {
$('#native-status span').text('not native');
}
// FB.api('/me', function(response) {
// $('#name span').text(response.name);
// alert(response.name);
// });
};
// Load the SDK's source Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
<header role="banner" class="clearfix">
<h1>Buy It (maybe?)</h1>
</header>
<div class="content clearfix">
<div id="auth-status">Auth Status: <span>Unknown</span></div>
<div id="native-status">Native Status: <span>Unknown</span></div>
<div id="name">Name: <span>Unknown</span></div>
<button id="login-btn">Login</button>
<button id="buy-it-btn">Try to Buy It</button>
<div>
<p>The purpose of this app is to show how checking the "Accept Mobile Web Payments:" box disables an application within iOS, even if this app does not attempt to allow the user to purchase facebook credits when inside the native iOS facebook application.
</div>
</div><!-- / content -->
<footer role="contentinfo">
</footer>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-1.7.2.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/script.js"></script>
<script src="js/helper.js"></script>
</body>
</html>