<?php $appid = ''; // your AppID $secret = ''; // your secret // init app with app id (APPID) and secret (SECRET) FacebookSession::setDefaultApplication($appid ,$secret); $session = new FacebookSession($_SESSION['demo_accessToken']); $session_long_lived = $session->getLongLivedSession($appid, $secret); $request = new FacebookRequest( $session_long_lived, 'GET', '/me/accounts' ); $response = $request->execute(); $graphArray = $response->getGraphObject()->asArray();get it~ You can check it by Facebook debug tools
2014年7月16日 星期三
Facebook PHP SDK 4.0 get long lived session/token for manage_pages
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言