dsf12123 2017-03-20 09:39
浏览 66
已采纳

在Facebook上分享帖子时 - 不会重定向回网站

I getting this after share https://www.facebook.com/dialog/return/close?#_=_. Found question on stackoverflow but without solution. The share working properly, all works except return to example.com after sharing. here my code how I sharing to the facebook:

<a href="<?php echo 'http://www.facebook.com/sharer.php?u=' . urlencode("http://www.example.com/share/".$fbUser . "/&app_id=MYAPPID&redirect_uri=http://www.example.com/"); ?>">Share Vadim</a>

please advise. How to redirect after seccufull sharing back to example.com ?

  • 写回答

1条回答 默认 最新

  • doule6314 2017-03-20 10:03
    关注

    Sharer.php is no longer working.

    I've made this function so try using it by modifying however you like it : (use it in an onclick for example)

    function fb_share() {
            // facebook share dialog
            FB.ui( {
                method: 'share', // Methord is share - there are different methods
                title: '<?php echo $mTitle;?>',
                name: 'Simple Text',
                href: '<?php echo $mURL; ?>',
                picture: '<?php echo $rooDir . $mImg;?>',
               // caption: '<?php echo $mCaption; ?>',
                description: '<?php echo $mDescription; ?>'
            }, function( response ) {
                // do nothing
            } );
    
    }
    

    Parameters and methods can be found here.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 三因素重复测量数据R语句编写,不存在交互作用
  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表