Here is the technique to get the detail of the Facebook page with Graph API and PHP. This is the very easy method to get the Facebook page detail. So Let’s see how to get this done.
With this method you can get below details of any Facebook page.
01) id
02) name
03) picture
04) link
05) likes
06) category
07) website
08) username
09) products
10) description
11) can_post
12) talking_about_count
I will show the example with the Facebook page of the Expert Developer. You can follow us on Facebook at Expert Developer.
Working Code
$url="https://graph.facebook.com/178585515507054";
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,2);
$content = curl_exec($ch);
$content = json_decode($content);
var_dump($content);
Output
public "id" => string "178585515507054" (length=15)
public "name" => string "Expert Developer" (length=16)
public "picture" => string "http://profile.ak.fbcdn.net/
hprofile-ak-snc4/277010_178585515507054_5770865_s.jpg" (length=81)
public "link" => string "http://www.facebook.com/expertdeveloper"
(length=39)
public "likes" => int 136
public "category" => string "Personal blog" (length=13)
public "website" => string "http://www.xpertdeveloper.com" (length=29)
public "username" => string "expertdeveloper" (length=15)
public "products" => string "Website." (length=8)
public "description" => string "This group is mainly belongs to the any
person who involved in internet market industry anyhow." (length=95)
public "can_post" => boolean true
public "talking_about_count" => int 8
Also you can get individual values as per below method.
// output
string "Expert Developer" (length=16)
Pingback: Get Twitter Follower Count with PHP | Expert PHP Developer
Pingback: XPertDeveloper.com: Get Facebook Seite Detail unter Verwendung Graph API und PHP | PHP Boutique