facebook
  • facebook-javascript-sdk
  • share
  • facebook-social-plugins
  • 2012-03-24 40 views 0 likes 
    0

    我已经使用这个代码加入人人网分享按钮我的网页:Facebook分享按钮分享的,而不是当前页面的URL,标题,等我的登录页面

    <a name='fb_share' border="0">Share</a> <script type='text/javascript' src='jquery.js'> </script> <script src='http://static.ak.fbcdn.net/connect.php/js/FB.Share' type='text/javascript'> </script>

    上面的代码共享电流网页正确,但是当我在网页开始处包含会话检查时,如果有效会话不存在,我将用户重定向到登录页面,上面的代码始终共享登录页面而不是当前页面。我正在使用PHP头函数进行重定向。请指教。

    回答

    1

    从没有公开访问的页面使用共享内容Feed Dialog

    0

    我使用{}您可以根据需要取消注释功能。请记住所有的分享按钮功能,不推荐使用类似/推荐按钮。


    <div id="msg"></div> 
        <script> 
          function feedthis() { 
         var obj = { 
          method: 'feed', 
        //to: ''+tobe+'' 
         //link: 'https://developers.facebook.com/docs/reference/dialogs/', 
         //picture: ''+pic+'', 
         // name: 'Facebook Dialogs', 
         //caption: 'Reference Documentation', 
         //description: ''+msg+'' 
         }; 
    
         function callback(response) { 
          document.getElementById('msg').innerHTML = "Post ID: " + response['post_id']; 
         } 
    
         FB.ui(obj, callback); 
         } 
    </script> 
    
    相关问题