How would I do this but using Graph API to grab locale and display content based on country?.
FB.login(function(response) {
if data.get('user').get('locale') = "en_GB" {
$("#footer a").text("URL HERE");
}
});
If you’re using the facebook javascript sdk for authenticating the user, then you get a signed request for the user, as it states in the signed request guide:
The signed request has the user field which is:
You should get the locale value even if the user hasn’t authenticated your app so that you could show content that matches it.
Edit
You have a few ways to get the authResponse, the most basic of which is to use FB.login, like so: