duanbi7204 2011-02-25 18:38
浏览 76
已采纳

在Facebook PHP SDK中进行回调

I'm using the PHP SDK on my site to let the users login using their FB acc.

After clicking on the login button there is a popup which asks for basic permissions. If the user click on Allow, my app can get the required data, it works all very well.

I'd like to make a callback for when the user click on the "Don't allow" button to show a message "For logging in to this website you have to provide us basic information. Please try again."

I know it's possible, i saw it once at another page, but after 2 hours of desperate search i decided to step back to SO :)

Thanks in advance!

DC

  • 写回答

2条回答 默认 最新

  • dozpv84422 2011-02-25 20:03
    关注

    In the doc for the login function, there is a parameter

    * - cancel_url: the url to go to after the user cancels
    *
    ...
      public function getLoginUrl($params=array()) {
    

    Which seems like it would do the trick. So you would invoke with something like

    getLoginUrl(array(
      'cancel_url' => 'http://yoursite.com/deny_callback.php', 
       ...
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献