Reputation: 44066
I have been using this approach to get the facebook big profile image
http://graph.facebook.com/<FBUID>/picture?type=large
but it redirects to another url. Is there a way to get the final url, because in an image tag it take a bit to load them all
<img width="46" height="46" src="http://graph.facebook.com/7715177/picture?type=large">
I am using php facebook
here is some of my php
//Facebook
$facebook = new Facebook(array(
'appId' => $config->get('fb_api_id'),
'secret' => $config->get('fb_api_secret'),
));
$user = $facebook->getUser();
if ($user) {
try {
$user_profile = $facebook->api('/me');
$token = $facebook->getAccessToken();
} catch (FacebookApiException $e) {
error_log($e);
$user = null;
}
}
any ideas on how to get the final url after the redirect
Upvotes: 0
Views: 718
Reputation: 1090
Have you tried using CURL with the CURLOPT_FOLLOWLOCATION set to true on
http://graph.facebook.com/<FBUID>/picture?type=large
?
Upvotes: 1