Facebook Credits and Foreign Currency

I am developing an application that uses FB Credits as a currency, however my clients will pay in local currency (ILS, Israeli shekel).

I know that the rate for 1 loan is 10 cents, however, the price in ILS, apparently, varies depending on changes in US dollar-ILS exchange rates.

Is there a way to request Facebook Server to find out what prices will be charged for local money? As a way to request a price list. Many new users do not understand the concept of loans, and I would like to show them what they are going to pay for local money.

+8
facebook currency internationalization facebook-credits
source share
4 answers

The Facebook Credits API does not have exchange rate information available. You can request this feature in your development team. It would be best to pull in the exchange rate (there are tons available during the search) and display this with a warning that this is just an estimate and that it depends on the actual Facebook exchange rate.

+6
source share

xe.com is a great feed, you can also retrieve data from yahoo or google finance

0
source share

As indicated by OffBySome, Facebook does not have exchange rate information. Thinking about this, I understand why they do not have this, because they do not want you to show the price of the local currency for goods. Although Facebook Credits are relatively new at the moment, and there is a lot of confusion for end users, in the end, when it becomes widespread, there will be no such problems.

I would suggest at the moment (since this is what I did - here is one Facebook Credit at the moment ~ 7p) that you simply hardcode in your application the price of 1 Facebook Credit in your local currency, and if necessary, display this, I I think that one of the reasons why Facebook does not support this is because they did not assume that applications using Credits would be limited to one territory, but in fact, not all of this is a game that will be used all over the world: )

0
source share

To bring this up, I tried two methods. One of them was to pull out the speed every 10 minutes with openexchange using this python function:

 def update_ils_rate(): print "Updating ILS/USD exchange rate" url = 'http://openexchangerates.org/latest.json' response = requests.request('get', url) content = response.content data = loads(content) return data['rates']['ILS'] 

However, it seems that facebook loans calculate the ILS rate (Israeli shekel) at a different rate (the calculations were few). Therefore, we decided to pull the xml data from the central bank of Israel using this function:

 import requests, BeautifulSoup def get_ils_rate(): response = requests.request('get', 'http://www.bankisrael.gov.il/currency.xml') content = response.content soup = BeautifulSoup(content) currencies = soup.findAll('currency') for c in currencies: if c.currencycode.contents[0]=='USD': return float(c.rate.contents[0]) 
0
source share

All Articles