Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chrisnharvey/codeigniter-facebook-spark
A Facebook library for CodeIgniter that allows you to make calls to the Facebook Graph API and easily integrate the meta tags for the Open Graph protocol
https://github.com/chrisnharvey/codeigniter-facebook-spark
Last synced: about 4 hours ago
JSON representation
A Facebook library for CodeIgniter that allows you to make calls to the Facebook Graph API and easily integrate the meta tags for the Open Graph protocol
- Host: GitHub
- URL: https://github.com/chrisnharvey/codeigniter-facebook-spark
- Owner: chrisnharvey
- Created: 2011-08-17T16:03:41.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2015-05-28T20:22:08.000Z (over 9 years ago)
- Last Synced: 2024-05-01T23:29:57.523Z (7 months ago)
- Language: PHP
- Homepage: http://www.chrisnharvey.com/
- Size: 114 KB
- Stars: 17
- Watchers: 5
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#CodeIgniter Facebook Spark
_Deprecated: Looking for a new maintainer for this package. Open an issue if interested._
We can call the Facebook Graph API like this:
$this->facebook->call("get", "me");
You can also POST or GET parameters in an array like this:$this->facebook->call("post", "me/feed", array("message" => "This is a message from the CodeIgniter Facebook Package"));
You can also upload images and other media to Facebook like this:$image = "@".realpath(BASEPATH."../image.jpg"); // This locates a JPEG located in the root directory of your CodeIgniter setup (where your index.php file is located)
$this->facebook->call("post", "me/photos", array("source" => $image, "message" => "This is an image uploaded from the CodeIgniter Facebook Package"));
Notice the "@" symbol before the URL, remember to include this whenever uploading media. For example "@/htdocs/www/images/image.jpeg"
You can add Open Graph data to your pages, create an array that will be passed to your view like this:$data['meta'] = array("og:title" => "CodeIgniter Facebook Spark", "og:type" => "website", "og:description" => "A Facebook spark for CodeIgniter that allows you to make calls to the Facebook Graph API and easily integrate the meta tags for the Open Graph protocol.", "fb:app_id" => $this->config->item("facebook_app_id"));
$this->load->view('facebook_demo', $data);
You can then parse the array in your view file with the help of the helper included in this package=facebook_meta($meta)?>
All configurable options for this package are located in the config file which can be found in the sparks folder.