Detect Facebook language - facebook

I'm working on a Facebook application where there will be 2 languages, obviously the user can switch himself, but I would also like to detect what language the user is using on Facebook so I can set that as a default one.
I checked the opengraph API, but there doesn't seem to be any way to detect this, are there any other options?

There is look here
https://developers.facebook.com/docs/reference/api/user/
Check locale and languages

Using Graph API:
/me?fields=locale

Related

Facebook custom story preview before posting

Is there anyway we can show a preview for Facebook's custom stories for users before they posting on their timelines?
If not something provided by Facebook, is it OK if we implement the same CSS/HTML code that Facebook uses or there are restrictions on doing this?
Thank you
There's nothing such default preview method, but yes you can implement this if you want. There's no such restrictions in doing this.
In fact, they prefer showing user the story somewhere in the application that you are going to publish on their behalf.

How do you display user name on Facebook tab without forcing user to allow

How do you display the user name / visitor name on a Facebook tab (Facebook app created in an Iframe) without requiring the user to accept additional permissions.
I have tried to use PHP and other examples that I have seen, however they all seem to be out of date or I am missing some type of code to implement.
This should not be in FBML as it will be depreciated very soon on Facebook.
Does anybody have an entire code example (since I must be missing something) of what it would take to implement how they have done it here: https://www.facebook.com/Greenwords - Notice that it does not require the user to click on anything in order to display the name.
Your help would be appreciated.
You used to be able to do this using facebooks FBML syntax. However, as you have stated, these methods are old/depricated.
Taken from the facebook FBML documentation :
We are deprecating FBML. On Jan 1, 2012: FBML will no longer be supported on Platform. June 1, 2012: FBML apps will no longer work. All FBML endpoints are removed. If you are building a new application on Facebook.com, please implement your application using HTML, JavaScript and CSS. You can use our JavaScript SDK and Social Plugins to embedded many of the same social features available in FBML.
So.. to answer your question - you'll have to build your own application and request basic information about the user. Using old and deprecated methods are not a good idea. Facebook has publicly stated that they will no longer support it.
I basically used to take a live stream or comments box and iframe that showing the users name or photo, then position it where I wanted.

Facebook UI documentation

I am trying to create a bookmarklet to process some Facebook data about my contacts, what will possibly require to load another profile pages and see who my friends are.
I am trying to know which urls should I query to get this information. And also how to interact with FB's UI libraries and/or elements.
Is there any documentation for this?
You probably are looking for Facebook JavaScript SDK.
Here is documentation on the FB.ui(): http://fbdevwiki.com/wiki/FB.ui
EDIT: it's updated by user contributions and lately it hasn't been changed much

Is the Like Button the only currently supported method for posting a webpage to Facebook?

The Like Button seems like a very specific, and not very elegant in my opinion, solution to allowing users to post a web page to their Facebook profile. You have two options: 1) Use the iFrame solution, which allows very little flexibility in functionality, integration or appearance or 2) the XFBML solution which requires loading the entire Facebook javascript SDK just for one little "share this" button.
Is the Like Button the only way that is currently supported by Facebook to allow sharing of content to a user's Facebook profile? It seems to be the only method mentioned anywhere in the Facebook developer documentation, and I've had trouble finding any alternatives elsewhere on the internet.
There was a service called Facebook Share:
http://www.facebook.com/sharer.php?u=<your url>&t=<your title>
I guess it's still working but I'm seeing people having troubles using it and Facebook is forcing developers to use the Like Plugin.
Now:
Most likely your visitors will have the Facebook JS Library cached on their browsers
Facebook uses CDNs and their servers are super fast
Even if it doesn't fit in your design, don't forget that users are used to it
You can create a Facebook Application and use the Graph API but it's way more complicated
Don't use their services!
Actually, Facebook share is the simplest and most natural solution to share content on your FB profile.
You may want to read this article.

How is a Facebook user's language / internationalization preference stored?

I'm developing a Facebook application for a business page. The application can only be accessed as a tab, meaning there is no box or direct access intended.
I've done my share of searching and even though I hate asking for help when I know the information I'm after must be there somewhere, I've reached
the point of exhaustion and beg for a solution.
I've managed to work with my application the way it was intended, it retrieves some data from my databases and users can view that information without
a problem. The issue here is that I'm unable to figure out a way of getting information from the user who is viewing that tab. I don't want any private stuff,
in fact, the only thing I need is to know in which language he/she is viewing FB so I can grab content in that language instead of the default.
I thought that maybe FB stored that information on a cookie, or a session variable, who knows. I'm sure I seen something like en_GB on a cookie from
FB once, but maybe it was a mere delusion from sleep deprivation.
I'm sure there is a pretty solution developed already and I just can't wait to learn about it!
Thank you for you time :)
To translate the application, you should be using facebook translations.
All the text in your app should be inside and other intl tags and the translation for these should be available on facebook translations app. Then facebook shows the translated text to the user based on their locale.
Facebook Translations app: http://www.facebook.com/translations/
You can see the strings to be translated here.
You also have to enable you applications for translations in the Translation app admin panel.
More about translations here : http://wiki.developers.facebook.com/index.php/Internationalization
Here's a method that describes getting the current user's language in a canvas frame even when the user hasn't logged in: http://fbdevwiki.com/wiki/Locales#Getting_the_User.27s_Locale . I suspect that it should also work in a page tab iframe.