php - Facebook: search people from apps -
i new both php , facebook graph api. trying build app search people. there no login, believe need use app access token. here code using:
<?php define('facebook_sdk_v4_src_dir', __dir__ . '/facebook/src/facebook/'); /** * load facebook sdk */ require __dir__ . '/facebook/autoload.php'; use facebook\facebooksession; use facebook\facebookrequest; /** * configure facebook */ facebooksession::setdefaultapplication('113868548952926', '9b6d12596769cd590aa4e77781a8f86c'); /** * app level session */ $session = facebooksession::newappsession(); /** * make request */ $request = new facebookrequest($session, 'get', '/search?q=peole work @ ford&type=user'); /** * execute */ $response = $request->execute(); print_r($response);
however facebook\facebookauthorizationexception
message a user access token required request resource
. mean need login function? can do?
php version: 5.6.8
thank you
Comments
Post a Comment