Facebook Graph API - 如何获取用户国家? [英] Facebook Graph API - how to get user country?
问题描述
我遇到了一个问题,我无法检索用户的国家,只有他们的位置 - 这只是城市和州/地区组合格式(如休斯敦,得克萨斯州)。
如何使用Graph API检索用户的国家?如果这不是直接可能的话,可能有什么解决方法可以实现这一点?
会给你:
<?xml version =1.0encoding =UTF-8?>
< fql_query_response xmlns =http://api.facebook.com/1.0/xmlns:xsi =http://www.w3.org/2001/XMLSchema-instancelist =true> ;
< user>
< current_location>
< city> Palo Alto< / city>
< state> California< / state>
< country>美国< / country>
< zip />
< id> 104022926303756< / id>
< name>加利福尼亚州帕洛阿尔托< / name>
< / current_location>
< / user>
< / fql_query_response>
因为我只能看到在fb上稳定的东西是FQL
使用 http://developers.facebook.com/docs/reference/ fql / 这里描述的表可以获取任何你需要的信息 - 图表api不好,但是
I'm developing a Facebook application using their Graph API. I have previously developed an app using the deprecated REST API.
I've come across a problem in that I can't retrieve the user's country, only their 'location' - which is just the city and state / region in a combined format (such as 'Houston, Texas').
How is it possible to retrieve the user's country using the Graph API? If this isn't directly possible, what workarounds might there be to achieve this?
will give you :
<?xml version="1.0" encoding="UTF-8"?>
<fql_query_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" list="true">
<user>
<current_location>
<city>Palo Alto</city>
<state>California</state>
<country>United States</country>
<zip/>
<id>104022926303756</id>
<name>Palo Alto, California</name>
</current_location>
</user>
</fql_query_response>
As i can see only thing which is stable on fb is FQL
Use http://developers.facebook.com/docs/reference/fql/ tables described here to get any info you need - graph api is not good yet
这篇关于Facebook Graph API - 如何获取用户国家?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!