Results 1 to 3 of 3
-
18th Jan 2012, 01:35 PM #1OPBannedWebsite's:
Seecure.me[PHP] Facebook Graph API
Hi,
So, I just coded a simple php class for the Facebook Graph, using it's API. Pretty much it covers, and does the following.
1. getID
2. getName
3. getPicture
4. getLink
5. getLikes
6. getCategory
7. getWebsite
8. getUsername
9. getFounded
10. getCompanyOverview
11. getMission
12. getTalkingAboutCount
[If you don't know how to use this, Don't use it all. This is here to share with users who do know php, and can use it, and to also use as a portfolio script if required]
PHP Code:<?php
/*
* Facebook GRAPH API, Get Fan Page Info
* Developer - Vick Kumar
* Contact - Vickkumar2011@gmail.com
* Website - www.seecure.me
* Version - 1.0
* License - Open Source
* Notes - null
* Date - 1/18/2012
* Shouts -> I <3 JmZ
*/
class FacebookGraph
{
public function init($id)
{
if(empty($id))
{
return false;
}
else
{
$fcg = file_get_contents("https://graph.facebook.com/$id");
$fcg = json_decode($fcg, true);
$this->result = $fcg;
return true;
}
}
public function getID()
{
$id = $this->result["id"];
return $id;
}
public function getName()
{
$name = $this->result["name"];
return $name;
}
public function getPicture()
{
$picture = $this->result["picture"];
return $picture;
}
public function getLink()
{
$getlink = $this->result["link"];
return $getlink;
}
public function getLikes()
{
$getlikes = $this->result["likes"];
return $getlikes;
}
public function getCat()
{
$getCat = $this->result["category"];
return $getCat;
}
public function getWebsite()
{
$getWebsite = $this->result["website"];
return $getWebsite;
}
public function getUsername()
{
$getUser = $this->result["username"];
return $getUser;
}
public function getFounded()
{
$founded = $this->result["founded"];
return $founded;
}
public function getCompanyOverview()
{
$overview = $this->result["company_overview"];
return $overview;
}
public function getMission()
{
$mission = $this->result["mission"];
return $mission;
}
public function getTalkingAboutCount()
{
$talkingabout = $this->result["talking_about_count"];
return $talkingabout;
}
}
$n = new FacebookGraph();
$n->init("19292868552");
echo $n->getID();
echo $n->getName();
?>_Vick Reviewed by _Vick on . [PHP] Facebook Graph API Hi, So, I just coded a simple php class for the Facebook Graph, using it's API. Pretty much it covers, and does the following. 1. getID 2. getName 3. getPicture 4. getLink 5. getLikes 6. getCategory Rating: 5
-
20th Jan 2012, 10:28 AM #2MemberWebsite's:
tehMoviez.com 0Senes.com GeekFaceGames.comvery useful, thanks
JokerHacker Blog
JokerHacker PHP coding Service // back again!
CurlAxel PHP Download Accelerator
hardly remembering the milk :p
-
6th Feb 2012, 10:19 AM #3Member
great forum>great share>thanks man
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[Hiring] FaceBook Open-Graph Developer
By orbitfum in forum ServicesReplies: 0Last Post: 4th Aug 2012, 12:02 PM -
Need Partners on Facebook to Exchange Wall Post or Comment of Facebook
By Jawus in forum Community CooperativeReplies: 0Last Post: 23rd Mar 2012, 08:51 PM -
It's time to add the Open Graph to Sites
By Mr Happy in forum Feedback and SuggestionsReplies: 5Last Post: 21st Mar 2012, 04:13 AM -
[Selling] Facebook Lead Generation Service - Pre-Qualified Facebook Leads
By sefstar2uk in forum Completed TransactionsReplies: 10Last Post: 29th Feb 2012, 10:27 AM -
Need Photoshop Help with a Graph
By piratebay in forum Technical Help Desk SupportReplies: 7Last Post: 23rd May 2011, 08:38 AM
themaRegister - register to forums...
Version 3.54 released. Open older version (or...