As you are no doubt aware, recently Facebook unveiled a new suite of APIs that we can use in our own applications. IP.Board already had existing integration via Facebook Connect but we decided to move over to the new Graph APIs for IP.Board 3.1 and be right on the curve.
As IP.Board is used on thousands of different hosting machines, we are used to making our code as portable as possible. This usually means ensuring there is fallback functionality for common PHP extensions.
The official PHP SDK is at github.com. It’s very early days so it hasn’t fully matured. It has no fallback methods when CURL isn’t available which is more common that you think. It also has a small bug with the CURL methods for Windows machines (IIS). None of these are huge problems but we had to fix them as we had no control over the hosting environments used.
Rather than manually patch the files, I simply forked the project so I can merge it with the official distribution for our own use. I also issued a pull request. Hopefully the Facebook developers will integrate the changes into their core code.
Until they do, you are welcome to use my Facebook PHP SDK github fork which fixes the following issues:
- Socket POST fallback for when CURL isn’t available
- SSL_VERIFYPEER fix for IIS hosting environements
- ‘curl_setop_array’ check for PHP < 5.1.3
Github.com was an excellent choice for hosting their source code, and I congratulate them for making it so easy to fork and fix.
Also, please note that I am maintaining this fork personally, not Invision Power Services.