Patch (to be ported)
Project:
Facebook OAuth (FBOAuth)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2013 at 21:05 UTC
Updated:
8 May 2016 at 13:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mrded commentedThis patch will add integration with profile picture.
Comment #2
joco_sp commentedI applied the patch, but now I'm getting this error:
'Warning: file_get_contents(http://graph.facebook.com/118xxxxxxx/picture?width=1000) [function.file-get-contents]: failed to open stream: Connection timed out in fboauth_field_convert_image() (line 219 of /home/user/domains/example.com/public_html/sites/all/modules/fboauth/includes/fboauth.field.inc).'
I can see the name of picture in the 'Profile_pictures' folder, but it has 0 KB size.
Comment #3
mrded commentedTry this patch
Comment #4
joco_sp commentedWith the new patch I get the same error, but now I can't even see the name of the picture in my 'Profile_pictures' folder.
Maybe there's a problem with the permissions to get the user picture from Facebook.
I also tried to import Facebook picture to the built-in user picture and I get the error (I ceked the box in 'Basic mapping'):
'Notice: Undefined property: stdClass::$data in fboauth_create_user() (line 262 of /home/user/domains/example.com/public_html/sites/all/modules/fboauth/includes/fboauth.fboauth.inc).'
It would be nice if someone else try the patch. Maybe its only me to get this error?
Comment #5
imoreno commented#3 does not work for me, no errors, but picture is not imported.
Comment #6
mrded commentedJust to be clear. This patch will not import Facebook picture to $user->picture
This patch will provide additional "Profile picture" option for image's fields.
And you can choose it from Facebook OAuth Profile2 Integration module's settings. (See screenshot)
Comment #7
imoreno commentedIs there a way to use profile2 integration without display the profile fields on user login form?
Comment #8
mrded commentedYou may need to check this issue #1784740: To be able to use Profiles that are not required in user's registration
Comment #9
joco_sp commentedOk, the #1 and #3 worked for me. Now we only have to import them. I found this site, I'll try to do it
http://www.grasmash.com/article/connecting-facebook-drupal-easy-way-part-2
Comment #10
imoreno commentedcurrently, both #7 and #9 are not a valid solution. maybe I'm missing something.
Comment #11
mrded commented@imoreno, if you you want to import picture to $user->picture - this solution is not valid for you. Check #6
Comment #12
ace11 commentedNice! #3 works like a charm.
Comment #13
Barto.G commentedHere is my 2 cents
At first the patch #3 did not work. I got the same as #joco (file_get_contents timed out).
Then i changed the width of file request from "1000" to "300" in
My field only allow for files smaller than 500X500 pixels.
Second test worked perfectly
Thanks for the patch
Comment #14
mrded commentedComment #15
Anonymous (not verified) commentedHow to I fix the following error message?
Error message
The specified file temporary://fileTNxt63 could not be copied, because the destination directory is not properly configured. This may be caused by a problem with file or directory permissions. More information is available in the system log.
Comment #16
bibishani commentedHi, superduperdan.
You can fix this error if replace this lines :
$destination = file_field_widget_uri($field, $instance) . "/$fbuser->id.jpg";
$file = file_save_data($image, $destination, FILE_EXISTS_REPLACE);
with :
$directory = file_default_scheme() . '://' . variable_get('user_picture_path', 'pictures');
$file = file_save_data($image, $picture_directory, FILE_EXISTS_RENAME);
Comment #17
darrellduane commentedCould someone provide a patch file? At a quick glance I'm not sure which file these changes are for.
Comment #18
AlexKirienko commentedHi, DarrellDuane.
Please check this patch based on #3.
Patch #3 was updated to use fboauth_graph_query and support latest changes in dev version (v2+ FB API)
Comment #19
darrellduane commentedOk, I'll incorporate this patch instead for the Profile Picture integration.
Comment #20
darrellduane commentedOK, this has been added to the latest development version. Sorry I wasn't able to add in the right commit options this time.
Comment #21
khoomy commentedHi DarrellDuane
I am still facing an issue when using Amazon S3 file system.
It shows
File temporary://file7kmIXk could not be copied, because the destination directory s3://users/2016/05/08 is not configured correctly.Comment #22
khoomy commentedHi DarrellDuane
Here is a patch which fix the issue for S3 File system.
Cheers