こんにちは私は最近Facebookのアプリやアクションをたくさん扱っていますが、うまくいかないようです。いいねのソーシャルボタンが移行されようとしていると聞きました。作成したアプリ(ウェブサイト用のアプリ)を使用して、いいねの組み込みアクションを公開する方法すらわかりません。私がここから取ったアクションを公開するためのコード:https ://developers.facebook.com/docs/opengraph/tutorial/そしてこれは彼らが言うことです:
<head prefix="og: http://ogp.me/ns# [YOUR_APP_NAMESPACE]:
http://ogp.me/ns/apps/[YOUR_APP_NAMESPACE]#">
<title>OG Tutorial App</title>
<meta property="fb:app_id" content="[YOUR_APP_ID]" />
<meta property="og:type" content="[YOUR_APP_NAMESPACE]:recipe" />
<meta property="og:title" content="Stuffed Cookies" />
<meta property="og:image" content="http://fbwerks.com:8000/zhen/cookie.jpg" />
other metatag properties etc.
<script type="text/javascript">
function postCook()
{
FB.api(
'/me/[YOUR_APP_NAMESPACE]:cook',
'post',
{ recipe: 'http://fbwerks.com:8000/zhen/cookie.html' },
function(response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Cook was successful! Action ID: ' + response.id);
}
});
}
</script>
</head>
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '[YOUR_APP_ID]', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};
// Load the SDK Asynchronously
(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/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
etc etc.
<form>
<input type="button" value="Cook" onclick="postCook()" />
</form>
<fb:activity actions="[YOUR_APP_NAMESPACE]:cook"></fb:activity>
実際、私はアクションを公開できません(エラーを返します)。もちろん、私のアプリには、公開しようとしているアクションがあります。誰か手がかりがありますか?私はプロの開発者ではありませんが、私が尋ねたものには解決策がありませんでした...どうもありがとう!