Reputation: 345
I am trying to use facebook php sdk in my app engine php application. But it gets an error.
when i use the statement require 'facebook.php'
, it generates an error with the message-
Facebook needs the CURL PHP extension
how do i get over with that exception?
Upvotes: 1
Views: 1233
Reputation: 887
This question is quite old, hence the previous answers. Anyone looking for an up-to-date solution can just download v5 or greater of the official Facebook PHP SDK. It natively supports various HTTP clients, Curl and HttpStreams included.
I just followed the installation instructions provided in their PHP SDK Getting Started guide and it works on my GAE instance with no configuration or patching.
Upvotes: 0
Reputation: 13
If anyone is looking to use the latest (version 4) Facebook SDK for PHP with Google App Engine, they can use this fork: https://github.com/ahsanity/facebook-php-sdk-v4-without-curl
The official SDK uses Curl to make all the API calls, making it unusable in environments that doesn't have the PHP Curl module enabled (example: Google App Engine)
This fork checks if PHP Curl module is enabled. If not, it falls back to using Http streams (via file_get_contents()). If Curl is detected, it uses Curl just like the official SDK.
Upvotes: 1
Reputation: 61
this library replaces curl with php http stream functions https://github.com/azayarni/purl
Upvotes: 0
Reputation: 7054
Use this branch of the SDK, that has http streams support.
https://github.com/camfitz/facebook-php-sdk
Upvotes: 1