Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wildlife created an issue. See original summary.

bvakulin’s picture

I have this bug too. I fixed it by adding fields to the options in _facebook_pull_render_block function.
before:
$options = array(
'limit' => $limit,
'locale' => $language->language,
);
after:
$options = array(
'limit' => $limit,
'locale' => $language->language,
'fields' => 'picture,type,message,created_time,from,link',
);

ShijunLiu’s picture

I think it is because of facebook upgraded their api and doesn't return the certain fields any more, but fortunately you can still get them by providing them explicitly. Thus bvakulin's code solved this problem.

I also made a patch based on his code.

mooazhammam’s picture

add the options settings as checkbox to ease of use and to avoid typos

oliveyrc’s picture

Nice Patch @mooazhammam. Applied okay and now pulls in the missing/required fields.

Freya’s picture

Also get the fields for a link (description + name)

Samba B’s picture

#2 worked for me.

veverita’s picture

I used #6 and it worked for me.
Thanks

GuyPaddock’s picture

@Freya: Why are there spaces around some of the field names?

ph7’s picture

I used #6 and it worked for me.
Thanks

mrprasa’s picture

#6 worked for me also. It pulls the thumbnail image though, and I need the full size image.

I tried changing the "picture" paramater to "full_picture" and do not get any results although this should work according to tests in the facebook developer graphs api at https://developers.facebook.com/tools/explorer

Below is the code I used.

$options = array(
'limit' => $limit,
'locale' => $language->language,
'fields' => 'full_picture,type,message,created_time,from,link',

mrprasa’s picture

Resolved the issue by modifying the template facebook_pull-feed.tpl.php by changing $item->picture to $item->full_picture

if (in_array($item->type, array('photo', 'video'))):
echo l('<img src="' . $item->full_picture . '" />', $item->link, array('html' => true, 'attributes' => array('target' => '_blank')));

truls1502’s picture

Why not have these patch be included to the next release version? Especially patch number 4 in comment #4 which give us able to choose of the fields.

However I am not able to get this works with Boxes-module

Gik000’s picture

#6 worked for me
Thank you

mooazhammam’s picture

Updated patch to 7.x-3.1

This Patch Do the following

1- fix the missing from property
2- allow the user to select the needed property to display
3- fix missing images and properties

Thanks

mooazhammam’s picture

Version: 7.x-2.9 » 7.x-3.1
Jelle_S’s picture

Status: Active » Needs review
FileSize
3.48 KB

New patch, also includes the 'name' and 'description' fields for when the item is a link.

fenstrat’s picture

Status: Needs review » Reviewed & tested by the community

#17 does indeed fix the issues noted here.

leooo_l’s picture

Hello, I'm trying to let images work properly following your patches and advises. For the moment I get thumbnails. But they are not aligned and a little messy. Moreover I tried to make changes suggested by mrprasa in order to get full pictures and not thumbnails, but I did not let the suggested code work properly (I got a syntax error somewhere in here '" />' after the 'full_picture wording....)
May someone help me out:
1) to get full size pictures
2) to get those picture aligned inside the page and not messy all around
?
Many thanks in advance for your help

fenstrat’s picture

@leooo_l Please see https://www.drupal.org/patch/apply on how to apply the patch in #17. If you require a full size image you will probably need to override facebook_pull-feed.tpl.php in your own theme see https://www.drupal.org/docs/7/theming/overriding-themable-output/about-o... - As for being "messy" you'll probably have to try some custom CSS to get what you're after.

daveferrara1’s picture

Status: Reviewed & tested by the community » Needs work

The patch provided #17 does fix the issue, however it is not working if you check and uncheck particular boxes. Some more work is needed for this feature.

Jelle_S’s picture

Reroll of #17

tim-diels’s picture

Reroll of #22 for version 3.3 and also added object_id as field so you can use it to retrieve better images.

  • tim-diels authored 0e21bc9 on 7.x-3.x
    Issue #2656664 by mooazhammam, Jelle_S, tim-diels, Freya, ShijunLiu:...
daveferrara1’s picture

Status: Needs work » Fixed

7.x-3.4 Includes a version of this fix.

daveferrara1’s picture

Status: Fixed » Closed (fixed)