I\'m developing a Facebook application using their Graph API. I have previously developed an app using the deprecated REST API.
I\'ve come across a problem in that
Use the php sdk:
require 'facebook.php';
$facebook = new Facebook(array( 'appId' => 'APPID', 'secret' => 'APPSECRET',
'cookie' => true, ));
Then ask for a signed request:
$signed_request = $facebook->getSignedRequest(); $country = $signed_request["user"]["country"];
Now $country has a string such as "us" for United States and "uk" for United Kingdom etc.