Settings the timezone for Facebook test users

Another (see below) problem I’ve had with test Facebook users is setting the timezone. The timezone of the user is what is returned with a query to the Facebook graph API https://graph.facebook.com/me

Here’s an example result:

{
  "id": "xxxxxxxxxx", 
  "name": "Eric Emo", 
  "first_name": "Eric", 
  "last_name": "Emo", 
  "link": "xxxxxxxxxx", 
  "location": {
    "id": "108252552529332", 
    "name": "Perth, Western Australia"
  }, 
  "gender": "female", 
  "timezone": 0, 
  "locale": "en_US", 
  "updated_time": "2012-11-20T02:52:31+0000"
}

We want the timezone to be set to Perth (WST) which is +0800, or 8 hours ahead of UTC. According to Facebook help, timezone is set when the user logs in. So how do we set the timezone for our test users? Simple.

  • Ensure the timezone of your computer is set to your desired timezone
  • Logout of your developer Facebook account
  • Login using the email provided on the App Roles page – something like eric_xxxxxx_emo@tfbnw.net and the password provided when you created your test user (or you can reset the password to something simple on the Roles page)
  • You may need to do this a couple of times to get it to “stick” (don’t ask me why!)

Make another call to /me on the Graph API Explorer (make sure you use your test user’s access token) and you should see the updated timezone field.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s