1

Can I access facebook location (latitude,longitude) from status update ? is there any API for that?? Please suggest me, If you know any resources about it.

Adnan
  • 8,468
  • 9
  • 29
  • 45

1 Answers1

2

You don't need a different API for that. And to the best of my knowledge, there is no separate API for pulling out location details from a Status Update.

That being said, any Status Update that has a location specified will return something like this:

"place": {
        "id": "243114582418387", 
        "name": "Pune!!", 
        "location": {
          "latitude": 18.51759564, 
          "longitude": 73.83373153
        }
      }

The above sample is from one of Status Updates that I fetched using this Graph API query: USER_ID/posts?with=location. However, you will still get the same structure even if you were to say, query using USER_ID/home or USER_ID/feed.

All you really have to do is check if the Status Update has a "place" tag and if available, parse the result. The structure above has the latitude and longitude under the "location" tag.

I work primarily on Android, and since you haven't tagged your platform in your post I cannot help out with the actual code. But the logic, I'm sure can be used on any platform.

Siddharth Lele
  • 27,623
  • 15
  • 98
  • 151
  • Is there a way to search Instagram posts using latitude and longitude without using the API – Sitz Blogz Apr 12 '17 at 06:20
  • @SitzBlogz: No clue. I have never worked with the Instagram API. – Siddharth Lele Apr 13 '17 at 04:30
  • I am not asking about Instagram API, I am asking about webscraping instagram posts with geo location. Something like this http://stackoverflow.com/questions/43033378/web-scraping-with-selenium-python-twitter-instagram – Sitz Blogz Apr 13 '17 at 04:38
  • @SitzBlogz: I still have no idea how that would work. API or otherwise, I still have no experience with Instagram. – Siddharth Lele Apr 14 '17 at 05:06