我有打开图表的问题。 当我使用调试Facebook工具时,我有以下错误消息:
"error": {
"message": "An unexpected error has occurred. Please retry your request later.",
"type": "OAuthException",
"code": 2
}
当我使用带有令牌生成器的Graph API Explorer时:
输入POST:https://graph.facebook.com/1145358260/univercial:read 添加新字段:课程http://www.filmslive.net/cours-6
没关系!!!
这是我的代码:
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr-FR" xmlns:fb="https://www.facebook.com/2008/fbml">
<head prefix="og: http://ogp.me/ns# univercial: http://ogp.me/ns/apps/univercial#">
<title>Univercial | Read <?php echo $nom; ?>Lesson</title>
<meta property="fb:app_id" content="429852050395283" />
<meta property="og:type" content="univercial:Lesson" />
<meta property="og:url" content="http://www.filmslive.net/cours-6">
<meta property="og:title" content="Read <?php echo $nom; ?> Lesson" />
<meta property="og:description" content="1ére Plateform d'interraction entre les jeunes étudiants du Maroc" />
<meta property="og:image" content="http://www.filmslive.net/images/200_200.jpg" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '429852050395283', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true
});
};
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/fr_FR/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
function postRead() {
FB.api('/me/univercial:Read?Lesson=http://www.filmslive.net/cours-6', 'post', function(response) {
if (!response || response.error) {
alert('erreur');
} else {
alert('ok');
}
});
}
</script>
<form>
<input class="float_left bouton_vert" type="button" value="Read" onclick="postRead()" />
</form>
结果:警告('erreur')
我可以使用Feed,但是,我不能使用publish_actions。