How to login with OFFLINE_ACCESS using the new Facebook PHP SDK 3.0.0?

后端 未结 3 946
小鲜肉
小鲜肉 2021-01-31 06:35

with the old (2.x) SDK I used this to log someone with offline_access:

$session = array
(
    \'uid\' => $userdata[\'fb_uid\'],
    \'sig\' => $userdata[\'         


        
3条回答
  •  一生所求
    2021-01-31 07:20

    With PHP SDK 2.0 (I guess), I just use it like

    $data = $facebook->api( '/me', 'GET', array( 'access_token' => $userdata['fb_access_token'] ) );
    

    This should work with the newer one to as it seems to be more of a clean approach than rather setting up sessions by ourself. Can you try?

提交回复
热议问题