New way to detect Facebook API user currency

本秂侑毒 提交于 2019-12-01 07:42:01

问题


Since currency field is deprecated form January 08, 2019, you can find user_currency in payment_mobile_pricepoints object.

Don't forget to add payment_mobile_pricepoints into requested fields list

FB.api("/me", {fields:"payment_mobile_pricepoints"}, function(result){
    var currencyCode = result['payment_mobile_pricepoints']['user_currency'];
});

Hope it helps to somebody


回答1:


Since currency field is deprecated form January 08, 2019, you can find user_currency in payment_mobile_pricepoints object.

Don't forget to add payment_mobile_pricepoints into requested fields list

FB.api("/me", {fields:"payment_mobile_pricepoints"}, function(result){
    var currencyCode = result['payment_mobile_pricepoints']['user_currency'];
});

Hope it helps to somebody



来源:https://stackoverflow.com/questions/54126920/new-way-to-detect-facebook-api-user-currency

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!