我想通过以下方式知道我的网页访问者来自哪个城市:
1. If the visitor has a public Facebook profile,
then return her Facebook location.
2. Otherwise, return her location based on the IP address.
我知道怎么做(2)。但是有办法做(1)吗?
答案 0 :(得分:1)
没有他们授权你的申请,没有。
否则,API中对/USER_ID
的基本调用将返回其区域设置
答案 1 :(得分:0)
只需向user.location - https://developers.facebook.com/docs/reference/api/user/
询问图谱API答案 2 :(得分:0)
您可以使用MaxMind API根据用户的IP来获取用户的位置 http://www.maxmind.com/app/ip-location
要从他的个人资料中获取用户的位置,您可以使用图谱API https://developers.facebook.com/docs/reference/api/user/