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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -