wgx731's Technical Blog

Programmer @ National University Of Singapore.

Facebook App Type Matters

| Comments

Only select Native/Desktop if you you have embedded your App Secret in your client app. For all other cases you should choose Web.

Facebook Developer

Why I Bring this out?

Because of the wrong settings, I have spent 2 hours to debug a ‘bug’ that Facebook PHP SDK $facebook->getUser(); is always return 0, by the way, I think Facebook PHP SDK should give some useful feedback instead of just return 0 in such case.

Lesson learnt

  1. Read the documentation carefully before start coding, especially when doing application for Facebook, the settings page has so many things to be filled up.
  2. I need to find a way in PHP to do something like python ipdb.set_trace() so that I can step through the process and figure out what causes the error.
  3. Have a rest if you mind is blowing up, take a step back to see the problem. >_<

Comments