如何使用Php的Facebook Graph Api获取距离用户1000米最近的位置?我得到了这个图形api的链接https://graph.facebook.com/search?q=coffee&type=place&中心=37.76,-122.427&distance=1000,但不了解如何执行。提前感谢您的帮助。
使用file_get_contents
从图形api获取位置。
file_get_contents("https://graph.facebook.com/search?q=store&type=place¢er=37.76,-122.427&distance=1000&access_token=YOUR_ACCESS_TOKEN");
$search_result = $facebook->api('/search?q=coffee&type=place¢er=37.76,-122.427&distance=1000');
您将在$search_result
中得到结果。