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($fcgtrue);
          
$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