Facebook发布到用户';长城

Facebook发布到用户';长城,facebook,api,facebook-graph-api,Facebook,Api,Facebook Graph Api,任何关于如何制作内容的指南,当用户使用Facebook登录到我的网站时,它可以自动使用他们的Facebook帐户发布状态,比如“John刚刚加入mysite.com”,这样他们的所有朋友都可以看到。像那样吗? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmln

任何关于如何制作内容的指南,当用户使用Facebook登录到我的网站时,它可以自动使用他们的Facebook帐户发布状态,比如“John刚刚加入mysite.com”,这样他们的所有朋友都可以看到。像那样吗?


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Facebook post</title>
  </head>
  <body onload="publishWallPost('{{ page.slug }}')">
    <script>
    window.fbAsyncInit = function() {
        FB.init({appId: 'Your Super Cool App ID', status: true, cookie: true, xfbml: true});
            };
        (function() {
            var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
            document.getElementById('fb-root').appendChild(e);
        }());
    </script>




    <script>
    <!--
    function publishWallPost(slug) {
        var attachment = {'name':'My Super Cool Website','description':'This is a test of the Facebook Broadcast System.  If this was real, you would be reading something useful.','media':[{'type':'image','src':'http://MySuperCoolWebsite.com/images/facebook_image.png','href':'http://www.MySuperCoolWebsite.com/' + slug + '/'}]};
        FB.ui({
            method: 'stream.publish',
            message: 'I just found this Super Cool Website!',
            attachment: attachment,
            user_message_prompt: 'post this to your wall?'
        });
    }
    //-->
    </script>
  </body>
</html>
Facebook帖子 window.fbAsyninit=函数(){ init({appId:'Your Super-Cool-App-ID',status:true,cookie:true,xfbml:true}); }; (功能(){ var e=document.createElement('script');e.async=true;e.src=document.location.protocol+'///connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); }());
非常感谢,我应该把它放在哪里,liek什么页面?下面是通过PHP在Facebook上上传封面照片的教程。