Global Startup Funding Over Time

Advertisements

instragram user IDs

Been playing with the instagram API a little bit today and hit a brick wall trying to pull user data.

So here’s the deal: username and user id are not the same in instagram-land. For example, in API speak the user id of 3 is allocated to kevin (founder of instagram). But in instagram profile land, the username of 3 is some complete other dude.

There’s no easy way to easily translate  between these two elements except these API calls may help:

Also, some dudes on stackoverflow have created some nice tools to do this.

Confused? Yeah, I sure was.

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.