Exchange API error

Posted in: Newspaper
Post count: 3

Hi,
When I want to use Exchange widget in my sidebar site, it gives that error:
Exchange API error: Api call failed
My site is theturkishsun.com
How can we solve that problem?

Post count: 22421

Hi,

Please try this temporary solution and see if it works – http://screencast.com/t/Te9gPmWp0http://pastebin.com/GDCGkfvA
Don’t forget to make a backup of your current file so you can revert in case that something goes wrong.
Let us know how it goes.
Also I have added this on our list for further investigations as it happens only in specific conditions.

Thanks!

Post count: 3

Hi,
I used the code below and replaced with the code here: http://screencast.com/t/Te9gPmWp0http://pastebin.com/GDCGkfvA
And Exchange widget works well. Thanks a lot.

if ($json_api_response === false) {
//try via http
$api_url = ‘http://api.fixer.io/latest’;
$json_api_response = td_remote_http::get_page($api_url, __CLASS__);
if ($json_api_response === false) {
td_log::log(__FILE__, __FUNCTION__, ‘Api call failed’, $api_url);
return ‘Api call failed’;
}
}

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.