0
ATM IM试图让Facebook的API来工作,我被困在OAuth的的Facebook的Javascript OAuth错误Occurrred
<!DOCTYPE html>
<head>
<script src="http://connect.facebook.net/en_US/all.js"></script>
</head>
<body>
<fb:login-button autologoutlink="true" onlogin="OnRequestPermission();">
</fb:login-button>
<script language="javascript" type="text/javascript">
FB.init({
appId: '143655195699763',
status: true,
cookie: true,
xfbml: true
});
</script>
</body>
</html>
至于我尝试登录我得到一个错误
错误发生。请稍后再试。
任何想法?
另外,如果我使用那个,我仍然会得到相同的错误信息...也许它有我的appID待办事项?
<!DOCTYPE html>
<head>
<script src="http://connect.facebook.net/en_US/all.js"></script>
</head>
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '395527397147712', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};
</script>
<script>
function fb_publish() {
FB.ui(
{
method: 'stream.publish',
message: 'Message here.',
attachment: {
name: 'Name here',
caption: 'Caption here.',
description: (
'description here'
),
href: 'url here'
},
action_links: [
{ text: 'Code', href: 'action url here' }
],
user_prompt_message: 'Personal message here'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
}
</script>
<input name="" type="button" onClick="fb_publish()">
</body>
</html>
那是你唯一的代码?你有没有试过[this](https://developers.facebook.com/docs/reference/javascript/)? – 2012-04-24 06:56:22
用新代码更新了第一篇文章 – 2012-04-24 07:17:44
您是否在浏览器的控制台中看到任何东西? FB可能会写更多关于错误的信息。 – Marc 2012-04-24 07:21:47