0
私はFacebookのAPIを使用して少し混乱しています。私はFacebookの側で動作しているが、Facebookのアプリケーションのキャンバスのページでは動作していないコードを使用しています。ストリームを要求するFacebookコード
私はビットアイデアがありますが、わかりません。誰も私にこれの背後にある理由とFacebookのアプリケーションで実行されるコードを教えてもらえますか?
違いあなたは
http://apps.facebook.com/exampleAPP/test.php
または通常のURL
http://www. example.com/example/test.php
http://www. example.com/example/
のようなアプリケーションを使用してコードを実行するにはどのようなものですが、私はstream.publish
が廃止されましたかなり確信しているキャンバスのURL
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : '115454544334343454',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.ui(
{
method: 'stream.publish',
attachment: {
name: 'JSSDK',
caption: 'The Facebook JavaScript SDK',
description: (
'A small JavaScript library that allows you to harness ' +
'the power of Facebook, bringing the user\'s identity, ' +
'social graph and distribution power to your site.'
),
href: 'http://fbrell.com/'
},
action_links: [
{ text: 'fbrell', href: 'http://fbrell.com/' }
]
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
</script>