Activity Stream
48,167 MEMBERS
6818 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 3 of 3
  1.     
    #1
    Banned
    Website's:
    Seecure.me

    Wink [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($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

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    tehMoviez.com 0Senes.com GeekFaceGames.com
    very useful, thanks

  4.     
    #3
    Member
    great forum>great share>thanks man

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Hiring] FaceBook Open-Graph Developer
    By orbitfum in forum Services
    Replies: 0
    Last Post: 4th Aug 2012, 12:02 PM
  2. Replies: 0
    Last Post: 23rd Mar 2012, 08:51 PM
  3. It's time to add the Open Graph to Sites
    By Mr Happy in forum Feedback and Suggestions
    Replies: 5
    Last Post: 21st Mar 2012, 04:13 AM
  4. [Selling] Facebook Lead Generation Service - Pre-Qualified Facebook Leads
    By sefstar2uk in forum Completed Transactions
    Replies: 10
    Last Post: 29th Feb 2012, 10:27 AM
  5. Need Photoshop Help with a Graph
    By piratebay in forum Technical Help Desk Support
    Replies: 7
    Last Post: 23rd May 2011, 08:38 AM

Tags for this Thread

BE SOCIAL