Facebook ページのウォールから、画像を含むアクティビティを自分の Web サイトに取り込もうとしています。ただし、標準の Activity Plugin を使用すると、すべてが表示されます (友達を含むが、自分のページの投稿に限定したいだけです)。
これをJqueryの方法で行う方法はありますか? バー PHP。
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '385846108120057', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.api(
{
method: 'fql.query',
query: 'SELECT name FROM user WHERE uid=me()'
});
function(response) {
alert('Your name is ' + response[0].name);
});
FB.api(
{
method: 'fql.query',
query: 'SELECT post_id, actor_id, target_id, message, attachment
FROM stream
WHERE source_id = '158904890800614',
AND actor_id = '158904890800614';
});
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>