achiever07 / micrsoft-translator-php-wrapper

Automatically exported from code.google.com/p/micrsoft-translator-php-wrapper
0 stars 0 forks source link

Api Not working #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
i wrote the following online below :
translator.php?to=es&text=how

response is :
{"status":"SUCCESS","translation":"The authorization type you provided is not 
supported. Only Basic and OAuth are supported\r\n"}

i have used the same account in config.inc.php provided at :
- https://datamarket.azure.com/account/keys -

if (!defined('ACCOUNT_KEY')) {
    define('ACCOUNT_KEY','XXXX');
}

Original issue reported on code.google.com by ZealousC...@gmail.com on 17 May 2013 at 3:17

GoogleCodeExporter commented 8 years ago
i have used the same account "key" in config.inc.php provided at :
- https://datamarket.azure.com/account/keys -
sorry for the mistake

Original comment by ZealousC...@gmail.com on 17 May 2013 at 3:20

GoogleCodeExporter commented 8 years ago
I would like to see your code to check what is the 'actual' problem. wrapper 
works perfectly as u can see the demo.. 

Original comment by renji....@gmail.com on 18 May 2013 at 5:23

GoogleCodeExporter commented 8 years ago
require_once('config.inc.php');
require_once('class/ServicesJSON.class.php');
require_once('class/MicrosoftTranslator.class.php');

$translator = new MicrosoftTranslator(ACCOUNT_KEY);
$text_to_translate = $_REQUEST['text'];
$to = $_REQUEST['to'];
$from = $_REQUEST['from'];
$translator->translate($from, $to, $text_to_translate);
echo $translator->response->jsonResponse;

i wrote the following online on the browser below :
translator.php?to=es&text=how

response is :
{"status":"SUCCESS","translation":"The authorization type you provided is not 
supported. Only Basic and OAuth are supported\r\n"}

Original comment by ZealousC...@gmail.com on 20 May 2013 at 2:21

GoogleCodeExporter commented 8 years ago
did anybody sove this issue? I have the same problem!

Original comment by dani.kal...@gmail.com on 27 Jun 2014 at 1:16