gpt4 book ai didi

javascript - 为什么会出现此错误 : The app you are using is not responding. 请稍后重试

转载 作者:行者123 更新时间:2023-11-30 18:34:41 25 4
gpt4 key购买 nike

我正在尝试使用 facebook 积分,但出现此错误:

“您正在使用的应用没有响应。请稍后重试。”

不知道是什么原因,

我查看了 firebug 控制台,看到一些长请求大约需要 40 秒,请求目标是:http://0-if-w.channel.facebook.com/pull?channel=p_685255507&seq =3&clientid=25523dd1&cb=gcgh&idle=41&state=active

有人知道我做错了什么吗?

这是我的 html 代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>Facebook Credits Demo Application</title>
<meta property="og:title" content="yosi" />
<meta property="og:type" content="game" />
<meta property="og:url" content="http://localhost/ff_without/Facebook/default.aspx" />
<meta property="og:image" content="http://apps.facebook.com/yositestmylife/Media/Images/credit.png" />
<meta property="og:site_name" content="life2d0001" />
<meta property="fb:admins" content="685000507" />
<meta property="og:description"
content="A group of U.S. Marines, under command of
a renegade general, take over Alcatraz and
threaten San Francisco Bay with biological
weapons."/>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js">
</script>
</head>
<body>
<h2>
Facebook Credits Demo Application</h2>
<p>
Create an order by specifying the following attributes:</br> <i>Title, price, description,
image URL and product URL</i></p>
<!-- Please note that user can change any information in order_info through
javascript. So please make sure you never put price or any other
information you don't want users to modify in order_info. We put everything
here only for end-to-end flow testing purpose!! -->
<form name="place_order" id="order_form" action="#">
Title:
<input type="text" name="title" value="BFF Locket" id="title_el" />
<br />
<br />
Price:
<input type="text" name="price" value="10" id="price_el" />
<br />
<br />
Description:
<input type="text" name="description" size="64" value="This is a BFF Locket..." id="desc_el" />
<br />
<br />
Image URL:
<input type="text" name="image_url" size="64" value="http://localhost/ff_without/media/images/credit.png"
id="img_el" />
<br />
<br />
Product URL:
<input type="text" name="product_url" size="64" value="http://localhost/ff_without/facebook/Credit_buy.aspx"
id="product_el" />
<br />
<br />
<a onclick="placeOrder(); return false;">
<img src="http://www.facebook.com/connect/button.php?app_id=<%=appID%>&feature=payments&type=light_l">
</a>
</form>
<div id="output">
<%=htmlResponse%>
</div>
<br/><br/>
<div id="fb-root">
</div>
<script type="text/javascript">
FB.init({appId: <%=appID%>, status: true, cookie: true});

function placeOrder() {
var title = document.getElementById('title_el').value;
var desc = document.getElementById('desc_el').value;
var price = document.getElementById('price_el').value;
var img_url = document.getElementById('img_el').value;
var product_url = document.getElementById('product_el').value;

// Only send param data for sample. These parameters should be set
// in the callback.
var order_info = { "title":title,
"description":desc,
"price":price,
"image_url":img_url,
"product_url":product_url
};

// calling the API ...
// var obj = {
// method: 'pay',
// order_info: order_info,
// purchase_type: 'item'
// };
var obj = {
method: 'pay',
order_info: order_info,
purchase_type: 'item',
dev_purchase_params: {'oscif': true}
};
FB.ui(obj, callback);
}

var callback = function(data) {
//alert('ghg');
if (data['order_id']) {
writeback("Transaction Completed! </br></br>"
+ "Data returned from Facebook: </br>"
+ "<b>Order ID: </b>" + data['order_id'] + "</br>"
+ "<b>Status: </b>" + data['status']);
} else if (data['error_code']) {
writeback("Transaction Failed! </br></br>"
+ "Error message returned from Facebook:</br>"
+ data['error_message']);
} else {
writeback("Transaction failed!");
}
};

function writeback(str) {
document.getElementById('output').innerHTML=str;
}

</script>
</body>
</html>

最佳答案

//改变了回调页面的编码。如果您的回调页面采用 UTF-8 编码,请检查它是否为无 BOM 的 UTF-8。

我认为此线程说明了您问题的解决方案。希望能帮助到你: http://forum.developers.facebook.net/viewtopic.php?id=90781

关于javascript - 为什么会出现此错误 : The app you are using is not responding. 请稍后重试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8588606/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com