For Facebook Integration

1 replies
For the guy that asked about it. Sorry for new topic, but the forum won't let me reply to your topic for some reason? But here is an example...

Something I put together for testing the graph ..

PHP Code:

function fetchData($user)
{
    if(!empty(
$user))
    {
        
$ch curl_init();
        
curl_setopt($chCURLOPT_URL"https://graph.facebook.com/".$user);
        
curl_setopt($chCURLOPT_RETURNTRANSFER1);
        
curl_setopt($chCURLOPT_REFERER"http://www.jpmalloy.com"); // change to your URL
        
$body curl_exec($ch); // json string
        
curl_close($ch);
        
$data json_decode($bodytrue);
        return 
$data;
    }
}

$user ''// Facebook username
$data fetchData($user);
echo 
"https://graph.facebook.com/".$data['id']."/picture?type=large"
Enjoy
#facebook #integration
  • Profile picture of the author kingjpm
    You can delete this thread, finally the reply posted. HTTP post request to the forum kept bugging out
    Signature
    RogueDen.com
    {{ DiscussionBoard.errors[9287121].message }}

Trending Topics