Open skrosoft opened 10 years ago
Hi Vincent,
this works for me without any problems.
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
is already used in ngConnectFunctions::fetchDataFromUrl
It doesnt work for me
This line doesnt help because there is no problem getting the image file without the extension
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
The problem is that the destination filename is generated without extension, and my ezpublish doesnt accept a file without extention
$fileName = $storageDir . '/' . $authResult['login_method'] . '_' . $authResult['id'];
Maybe I just need a PHP Extension in my server's configuration? php_fileinfo ?
Thank you.
Atte,
php_fileinfo enabled, the problem is still here, maybe its because I'm using 5.3.X?
What do you think?
I honestly don't know what the problem could be.
My profile picture from Facebook correctly redirects to JPEG version.
https://graph.facebook.com/edi.modric/picture?type=large redirects to https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn2/t5/276026_627700479_2028134500_n.jpg
eZ Publish correctly fetches it and stores. Try updating your profile picture on Facebook, to see if that fixes the problem.
Edi,
The problem is not getting the image, the problem is the filename without file extension generated by:
$fileName = $storageDir . '/' . $authResult['login_method'] . '_' . $authResult['id'];
This filename is generated before the curl request, so there is no issue with the cURL request.
Apparently, this is not an ngconnect issue but an issue with the fromString function that does not allow source filename without extension.
I will investigate and if I have more information, I will share it to you.
Thank you for your time.
I know, what I wanted to say is that Facebook obviously provides URLs without extensions, so I'm not really sure I can do anything in Netgen Connect in that case.
You could add an entrie in the INI file and update the PHP code ;)
I'm sorry Vincent,
add an entry with what? What can we do (except guessing) if Facebook doesn't provide the extension of the picture?
Hi,
Facebook large profile picture doesnt work.
The CURL to graph.facebook.com/XXX/picture?type=large save the file to ngconnect/facebook_XXX but WITHOUT extension.
EzPublish doent accept to use this following code with a filename without extension:
I solved that by using these following lines of code before the CURL request:
Any opinion? Is this fix is OK, the '.jpg' string could be implemented in the ngconnect.ini file for each Login Method.
Atte,