For Facebook Integration

by 1 replies
1
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
#programming #facebook #integration
  • You can delete this thread, finally the reply posted. HTTP post request to the forum kept bugging out

Next Topics on Trending Feed

  • 1

    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 ..