iFrame App. Permissions Request?

后端 未结 2 1427
独厮守ぢ
独厮守ぢ 2021-01-26 08:50

I want to request permissions when the user first clicks my iFrame Facebook application. The problem is the examples I have seen force the user to click a button to load the htt

2条回答
  •  难免孤独
    2021-01-26 09:08

    I do something like this in one of my iframe applications (I've simplified the actual code for this example)

    $fbSession = $facebook->getSession();
    if ( $fbSession )
    {
      $url = $facebook->getLoginUrl( array(
          'canvas'    => 1
        , 'fbconnect' => 0
        , 'req_perms' => 'list,of,perms'
        , 'display'   => 'page'
      ) );
      include( 'redirect.php' );
      exit;
    }
    

    Then, redirect.php

    
    

    Not being redirected? Click Here.

提交回复
热议问题