Direkt zum Hauptbereich

Posts

Es werden Posts vom Januar, 2011 angezeigt.

Facebook GRAPH Picture Upload Tutorial

So mit der Facebook GRAPH API lässt sich ja einiges machen. Ich widme mich heute mal dem Photo Upload. Und biete hierzu auch ein paar Code Samples an welche man benutzen kann. So let`s go. Am einfachsten mit der GRAPH API zu arbeiten ist es wenn wir mit dem Offiziellen PHP Packet von Facebook arbeiten. Dies gibts unter GITHUB: https://github.com/facebook/php-sdk/ Hier noch ein kleines Beispiel wie man dieses Paket zum laufen bringt: include_once('facebook.php'); class facebookFactory { private $facebook; private static $instance = null; private function __construct() { $this->facebook = new Facebook(array( 'appId' => APP_ID, 'secret' => APP_SECRET, 'cookie' => true, )); } private function __clone() { } public static function getInstance() { if(! self::$instance) { self::$instance = new facebookFactory(); } return self::$instance; } public function getFacebook() { return $this->facebook; } } Dies ist