Tobias Heuts
Tobias Heuts

Reputation: 123

Facebook Graph API - Fetching Address, but null

I have been trying to fetch my address by using the Graph API Explorer :

https://developers.facebook.com/tools/explorer/ :

  1. Get token
  2. Enabled all the checks
  3. Create token
  4. Add fields 'address'
  5. Set address in FB-profile
  6. Search
  7. API can't find any address?

Am I missing something?

Thanks in advance

Upvotes: 0

Views: 201

Answers (2)

Sujan Gainju
Sujan Gainju

Reputation: 4767

You need to give user_location permission while requesting for the token.

then

you can use

me?fields=id,name,location

to get the location of the user.

The response will be in the format

{
  "id": "userID",
  "name": "Profile name",
  "location": {
    "id": "randomID",
    "name": "name of the location"
  }
}

Upvotes: 1

Robert Chestnutt
Robert Chestnutt

Reputation: 322

Im not sure Facebook allows the extraction of that level of individual data anymore. They made major changes to the graph in late January, just before the Cambridge analytica controversy

The only way you probably could get that level of data is perhaps using something like Selenium or Scrapy.

Upvotes: 1

Related Questions