Tony Stark
Tony Stark

Reputation: 8094

Get locations using Graph Api of Facebook for Php

How to get locations nearest to 1000 distance of user using Facebook Graph Api for Php? I am getting this link of graph api https://graph.facebook.com/search?q=coffee&type=place&center=37.76,-122.427&distance=1000 but not understand how to implement. Thanks in advance for helping.

Upvotes: 0

Views: 1533

Answers (2)

Tony Stark
Tony Stark

Reputation: 8094

Using file_get_contents fetch the locations from graph api.

file_get_contents("https://graph.facebook.com/search?q=store&type=place&center=37.76,-122.427&distance=1000&access_token=YOUR_ACCESS_TOKEN");

Upvotes: 1

Madan
Madan

Reputation: 690

$search_result = $facebook->api('/search?q=coffee&type=place&center=37.76,-122.427&distance=1000');

You will get result in $search_result.

Upvotes: 0

Related Questions