用于定位的Facebook Graph API中使用的国家和城市列表 [英] List of countries and cities to be used in Facebook Graph API for targeting

查看:220
本文介绍了用于定位的Facebook Graph API中使用的国家和城市列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我发现了一个可用于JSON文件的国家/州/城市,可以在Facebook Graph API中使用。 这个页面,但文件不能正确解析,我也怀疑是否可以用于邮政定位,因为该文件是广告。



另外,我不确定第三方数据是否像由MaxMind提供可直接与Facebook API一起使用。



任何人有这样一个列表或至少可以指向我的方向?

我能够在我的问题中使用相同的JSON文件我提及 。正如我在回复@offbysome时所说的那样,之前我通过在Google Chrome中打开该文件来保存该文件。但后来我使用Firefox,并使用右键点击=>另存为文件选项将文件保存在磁盘上。这个文件实际上是一个tar gz(这个facebook错误地命名为.php文件)。解压缩文件后,我可以使用我的评论中发布的相同代码来获取我然后导入到MySQL的PHP​​数组。


I am looking for a list of countries/states/cities that can be used with Facebook Graph API when publishing targeted posts.

I found one JSON file available on this page but the file doesn't parse correctly and I also doubt whether it can be used for post targeting since the file is for advertisements.

Also, I am not sure whether the third party data like the one provided by MaxMind can be used directly with Facebook API.

Does anyone have such a list or can atleast point me to a right direction?

解决方案

Ok. I was able to use the same JSON file I mentioned in my question. As I said in my response to @offbysome, previously I had saved the file by opening it in Google Chrome. But then I used Firefox and used the Right Click => Save File As option to save the file on disk. This file is actually a tar gz (which facebook wrongly names as .php file). After unzipping the file, I was able to use the same code posted in my comment to get the PHP array which I then imported to MySQL.

这篇关于用于定位的Facebook Graph API中使用的国家和城市列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆