DISQUS

20bits: 5 Facebook Application Gotchas | 20bits

  • Ramani · 2 years ago
    Useful. thanks!
  • Aditya · 2 years ago
    I'd like to correct you on the session key part.

    A session is initialised by using the 'auth_getSession()' function of the 'FacebookRestClient' class. The return is an array which has three keys, one of them being the session key, and the last being the expire time in a Unix timestamp. If this is '0', then it's an infinite session ... else the timestamp tells us when it expires.

    People who have added the application always have an infinite session key :)
    Good list :P Sweet blog!

    Chow!
  • Eric · 2 years ago
    iLike had a couple million of users before facebook platform launched.
  • poitch · 2 years ago
    Aditya: auth_getSession on the post-add callback URL in most cases throws an Invalid Parameter Exception, and no it's not some kind of typo when passing the auth token since 5% of the time the same code does manage to retrieve a session. Bottom line I would not rely on this to retrieve the information.

    Regarding timeouts, that's a good point, but also in a lot of cases I'm getting the also famous the app did not respond problem when my server(s) are not even getting hit by facebook, not sure what the problem is there, the DNS have a pretty long TTL/Refresh if anybody knows that would be great.
  • Aditya · 2 years ago
    @Poitch: I've never had that exception when I've swapped the auth_token for the session_key immediately after hitting the callback URL from the login page. The auth_token expires fairly quickly, so it's better to swap it as soon Facebook redirects to your callback, which is also what Facebook tells us to do in the documentation :P
  • Ari Steinberg · 2 years ago
    Nice article. I was wondering about your issue #5 - we took a shot at fixing the lighttpd header issue last week. Can you verify that this is still a problem?

    Also, I'd add to your tips that it's probably worthwhile to subscribe to the Platform Status feed at http://www.facebook.com/feeds/api_messages.php in order to help you keep up with our changes. Thanks!
    -Ari
  • NACeqkok · 2 years ago
    smell
    smell
  • Shalini · 2 years ago
    Hey!
    Great tips on FB.. good to have a list to watch for...
    Well i decided to go with PHP and have the makings of an app!
    I’m facing an error though and if you could point me to a solution, it’ll be very nice.

    Call to a member function on a non-object in facebookapi_php4_restlib.php on line 1397 is what i get. And its really upsetting because i got the same error on a call to two things:
    1. $facebook->api_client->profile_setFBML
    2.facebook->api_client->feed_publishActionOfUser($feed_title,$feed_body);

    I have put this up on the facebook developer forum but no real replies there. You seemed to have comfortably used api_client calls well, so please guide me.

    Thanks in advance
  • Jason · 2 years ago
    Hi we are trying to get a flash API on Facebook but are having some problems. We are after an example of a Facebook API in AS3.0
  • social media · 1 year ago
    hey, this is great information have any more websites that i can go to for more great info? thanx
  • Gadzooku · 1 year ago
  • Robert Falco · 1 year ago
    Hey, thanks for your very informative post. i saw another one http://facebookster.com/blog/
  • Budda · 1 year ago
    Great info for a n00b Fb developer. The session info was useful.
  • uygarb · 9 months ago
    hi i have a problem with mysql&php.I cant submit a form to database table.all config are true.How can i write a button code?
    thanks....
  • Colin 'Danger' Wren · 7 months ago
    You are a saviour, I'm building a Facebook app as part of my BA and I've been stuck on session ID's for a while. I don't think I would have ever worked it out without this post. Thanks!
  • Sachin Jain · 6 months ago
    i like it
  • Ratnam Raj · 6 months ago
    hello how ru this is my new post please accept
  • Ratnam Raj · 6 months ago
    hello
  • Ratnam Raj · 6 months ago
    ldsfjlsdjflkjdf;ljdasl;fjds;la lklkfdsfds
  • Ratnam Raj · 6 months ago
    fdsdafdsfdsfdf
  • Ratnam Raj · 6 months ago
    this is test comment
  • hide2may · 5 months ago
    Sorry, I can't get the "Canvas Callback URL" thing right!
    Where can I find this info?
    I don't seem to have a fixed IP.
    I'm using XP + PHP5 + Apache2.2 + MySQL5.1
    Thanks in advance,
    -Jackie
    Email: hide2may@hotmail.com
  • Facebook Developer · 4 months ago
    Hey its really helpful. I was really searching for this. This will surely help Facebook Developers in their Facebook Application process. Thanks for sharing
  • Sai · 2 weeks ago
    Thank you for (3)
  • Facebookapplications · 1 week ago
    The two biggest"gotchas" I found were getting the app to show up as a "desktop app" on the users setting page in Facebook and having the desktop app log the user out of the browser session in addition to the desktop app... The answers are on that facebook wiki page...