Talk:PHP

From Facebook Developer Wiki

Revision as of 18:30, 20 August 2009 by Pete Bratach (Talk | contribs)
Jump to: navigation, search

Contents

Services_Facebook

Is there any usable documentation to Services_Facebook?

Failing to use functions as Users.hasAppPermission and Users.setStatus in the official PHP5 library I turned to the PEAR one but to no success. Is it a complete replacement for the official one or an addition? If the later, how do I combine them? I'm pretty lost on this one.

--1788332054 07:29, 28 May 2009 (PDT)

Facebook doesn't offer any documentation on Services_Facebook, as it's an unofficial community project (Facebook didn't add any of the Pear documentation to this article). I imagine you've already checked the Pear site? Pete (563683308 14:21, 28 May 2009 (PDT))

Someone should clean up the nasty code examples. --560880114 07:57, 7 November 2007 (PST)

What's up with the usage example? Isn't it completely wrong? ;) --610496754 15:47, 7 July 2008 (PDT)

Pathetic documentation

I had absolutely horrible time trying to figure out how to use the 'official' library, especially facebook_desktop.php Most of my problems have to do with implementation of login. Documentation re how to use the library for this purpose essentially does not exists. Trying to follow the recipe in general API section of this wiki runs into all sorts of traps that were set up by well-wishing creator of the library. For my desktop application I need to have my own server in turn talks to facebook.com. My own server should not support any interactive use, it is purely a service. So I am trying to follow the desktop model. 1. Desktop asks my service for login url. Service calls facebook.auth.createToken and returns http://www.facebook.com/login.php?api_key='[key]'&v=1.0&auth_token=[token] to desktop. 2. Desktop opens a browser with this url and has user going authorize the application. 3. Desktop calls the service with just used token. On the server side I can't manage to get the session. Neither calling get_session(), nor do_get_session(), nor require_login() works.

Already spent an incredible amount of time trying to implement authentication but to no avail. Very frustrated. The similar task for flickr was an considerably easier. At this point I am ready to drop the attempts to use the 'official' php library and try my luck with unofficial Services_Facebook.

Have you read Login Desktop App? -- Pete (563683308 13:32, 26 November 2008 (PST))

bad test app

Could someone please update this test app so that is actually works with the most recent API? I've already had to make one change, and trying to figure out the other problem.


bad Smiley App as well...

Looks like there is a file missing:

Warning: main(constants.php): failed to open stream: No such file or directory in /Smiley/index.php on line 6

Warning: main(): Failed opening 'constants.php' for inclusion (include_path='.:/usr/local/lib/php') in /Smiley/index.php on line 6

Warning: main(LIB_PATHmoods.php): failed to open stream: No such file or directory in /Smiley/index.php on line 7

Warning: main(): Failed opening 'LIB_PATHmoods.php' for inclusion (include_path='.:/usr/local/lib/php') in /Smiley/index.php on line 7

Warning: main(LIB_PATHdisplay.php): failed to open stream: No such file or directory in /Smiley/index.php on line 8

Warning: main(): Failed opening 'LIB_PATHdisplay.php' for inclusion (include_path='.:/usr/local/lib/php') in /Smiley/index.php on line 8

Fatal error: Call to undefined function: get_fb() in/Smiley/index.php on line 11

All I did was download all of the files, and upload them to my PHP5 compliant Linux server. Pretty frustrating using an out of the box example app, that doesn't work...

Where is the documentation for how to use the PHP Library, I cant find that. Lots of examples, but there is now documentat that lists all the functions available, with inputs etc.

Try API. -- Pete (563683308 12:24, 2 February 2009 (PST))
API helps with the documentation, but doesn't address the fact that the Smiley sample app is broken out of the box. Missing files all over. -- Alison
We realize Smiley is in need of an update. We're working on it. Thanks, Pete (563683308 10:48, 30 April 2009 (PDT))

(WAMP) PHP For Windows

I'm deploying my own server using a WAMP configuration instead of a LAMP one. Are these instructions and files good for PHP developed and deployed on Windows? ~Rhys

Updates

Is there any RSS feed or mailinglist where it's mentioned when this Library gets updated? Or could you provide a public svn repos for it? (718577434 07:40, 20 August 2009 (PDT))

The SVN repo is linked at the top of the article: http://svn.facebook.com/svnroot/platform/clients/packages/facebook-platform.tar.gz
Please read Facebook Platform Support Resources for the various ways you can keep up with what's new on Facebook Platform.
Pete (563683308 11:30, 20 August 2009 (PDT))
reference