dongxi1943 2010-12-28 15:37
浏览 52
已采纳

Facebook PHP SDK注销

I've implemented in my facebook app logout option, but unfortunately, it errors on rediredt loop..Does anyone know if the facebook sdk, redirects me back to the original page, or to the main page whicj is set in the applications settings in developers.facebook.com administration?? Anyway, is there any possibility how to logout from my app without redirecting?For example with cUrl request to the logout url, is that possible?

  • 写回答

3条回答 默认 最新

  • dongrong8972 2010-12-28 16:15
    关注

    You could consider using the FB javascript SDK for doing the logout and then you do not need to redirect (it is also possible to register a javascript callback and use window.location to do that):

    FB.logout(function(response) { // user is now logged out window.location = "xxxx"; });

    If you want to use the php sdk, you can pass in a "next" parameter, with the page you want to direcrect to: $location = (string) html_entity_decode($facebook->getLogoutUrl(array('next' => 'mysite.com')));

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥30 自适应 LMS 算法实现 FIR 最佳维纳滤波器matlab方案
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥15 Python3.5 相关代码写作
  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动