Forum Sitebox Language of user

Discussion and help relating to the PlayerIO webpage and Facebook app hosting solution, Sitebox.

Language of user

Postby azuanagames » August 26th, 2011, 12:04 am

I'm working on having a spanish version of my facebook app.

But I don't see how I can access the users locale. I can query for it with the as3 API but I don't see anything in sitebox for it. The locale is in the signed request, but we have no way of parsing that from sitebox...

What do you suggest?
azuanagames
 
Posts: 157
Joined: April 29th, 2010, 10:59 pm

Re: Language of user

Postby Oliver » August 29th, 2011, 10:11 pm

They have locale information in the signed request? that seems like a really odd place to put it.

Have you checked that we don´t already output the variable by adding "{% print_variables %}" to your template?

If we don´t output this information we´ll be happy to add it. Do you have a linke to facebooks page where they explain how they send over locale information?

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Language of user

Postby azuanagames » August 30th, 2011, 2:35 am

I'm not 100% sure...

I see this example code on the web

Code: Select all
    $app_id = "your_app_id_here"; 
    $app_secret = "you_app_secret_here"; 
     
    require_once 'facebook.php'; 
     
    $facebook = new Facebook(array( 
            'appId' => $app_id, 
            'secret' => $app_secret, 
            'cookie' => true 
    )); 

    $signed_request = $facebook->getSignedRequest(); 

    $locale = $signed_request['user']['locale']; 
    $country = $signed_request['user']['country']; 


$locale is what I need. "{% print_variables %}" does not have it for me :(

http://developers.facebook.com/docs/aut ... d_request/

Thanks
azuanagames
 
Posts: 157
Joined: April 29th, 2010, 10:59 pm

Re: Language of user

Postby Oliver » August 31st, 2011, 8:10 pm

Hey,

Thanks. We'll get it added.

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to Sitebox



cron