2012-12-30 3 views
1

사용자가 Facebook을 사용하여 내 사이트에 로그인하면 "John just joined mysite.com"과 같은 형식의 Facebook 계정을 사용하여 자동으로 상태를 게시 할 수있는 방법에 대한 모든 가이드 그들의 친구들이 보게 될 것이다. 그게 뭐니?사용자의 벽면 Facebook 게시

답변

0
<!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> 
+0

정말 고마워요, 어디서 입어야합니까, 어떤 페이지가 있습니까? – user1917642

+0

다음은 PHP를 통해 Facebook에 표지 사진을 업로드하는 방법입니다. http://socialdevelopers.wordpress.com/2013/01/03/facebook-covers-photo-php-script/ –

관련 문제