The link

```
http://graph.facebook.com/?id=http://givingmode.com/

```

gives me this data

```
{
   "id": "http://givingmode.com/",
   "shares": 3
}

```

Now I am using this script to get the id, shares in a PHP variable

```
    $File= file_get_contents('http://graph.facebook.com/?id=http://givingmode.com/');
    $p=json_decode($File);
    foreach ($p as $loc)
    {
       $fb_tot_share=$loc->shares;
    }

```

but I don't know what I am doing wrong;

I am getting `$fb_tot_share` as blank.