Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, I have the module working fine but my profile picture in the feed is just showing as a box with a ? in it.
I have tried using a different feed which works on another of my sites and I get the same issue.
Any ideas?
Many thanks.
Comment | File | Size | Author |
---|---|---|---|
#16 | facebook_pull-profile_pictures-2541316-16.patch | 11.88 KB | ptsimard |
#10 | facebook_pull-profile_pictures-2541316-10.patch | 6.84 KB | ptsimard |
#10 | facebook_fields_field.png | 10.3 KB | ptsimard |
#9 | facebook_pull-profile_pictures-2541316-9.patch | 5.77 KB | darvanen |
Comments
Comment #1
dpape CreditAttribution: dpape commentedI'm experiencing the same issue.
Looking at the facebook_pul-feed.tpl.php file and the "$item->from->id" and "$item->from->name" arent being populated. I'm diggin around to see whats going on.
Comment #2
darvanenPart of the problem lies in the fact that this module is no longer keeping up with the facebook API.
For instance this section of code returns a URL in the format "https://graph.facebook.com/[id]/[type]?access_token=[token]&limit=[limit]"
When it should now be in the format "https://graph.facebook.com/[version]/[type]?id=[id]&access_token=[token]..."
The caching system and simple admin UI make this module well worth keeping, but the interface with FB needs an overhaul.
Comment #3
darvanenThe Graph API no longer returns full Post objects for a feed edge.
Here's a patch that updates the Graph API call to take version into account (via settings form), with a stripped back template file to show only the fields that are returned.
Next steps if you need the profile pictures would probably be to create a sub-module that iterates through the post IDs returned by the feed edge call and populates the required fields.
This patch also incorporates Issue #1587598: Use drupal_http_request() instead of file_get_contents().
Comment #4
darvanenOops, here's the file.
Comment #5
bwporter CreditAttribution: bwporter commentedHi,
I appreciate the patch, but when I tried to apply it I got the following:
git apply -v facebook_pull-profile_pictures-2541316-3.patch
fatal: corrupt patch at line 140
Comment #6
darvanenJust tried it again on a fresh copy of the dev version, works fine for me.
Just want to check that you are:
Note that it's a pretty hacky patch only intended to get things working again, not a final solution.
Comment #7
bwporter CreditAttribution: bwporter commented@Darvanen - thank you for the quick response. I pulled a fresh copy of the module (btw, couldn't find a dev version) and a fresh copy of your patch and applied the patch as you suggested. It is working as expected for me now. Thank you.
Comment #8
darvanenGood to hear!
It looks like you can only get the dev version via git at the moment.
Comment #9
darvanenNew patch for recent dev version, no longer includes the related issue's code as that has been committed.
The template files need a lot of work - I haven't even touched the notes template.
Comment #10
ptsimard CreditAttribution: ptsimard commentedHello all. While trying to use this module I came across the same issues. I applied Darvanen's patch #9 which improved things but also added my own customization on top.
Namely:
Facebook Fields support:
Added a "fields" field in the admin interface so users can input which facebook fields they need pulled.
Changed the url syntax
Now using the documented api syntax:
https://graph.facebook.com/[api version]/[object id]/[object type]?[access_token]&[limit]&[fields]
Tested it with API v2.5
Changed the feed template file
Now makes use of the 'picture' field
Also added a
check_markup()
on the message field so it renders links.Disclaimer: I only tested this with a feed of posts from a page and it works perfectly. I'll let you test with the other things you might need it for.
Comment #11
ptsimard CreditAttribution: ptsimard commentedWow. My mouse quadruple-clicked the summit button.. weird. Edited*
Comment #12
ptsimard CreditAttribution: ptsimard commentedWow. My mouse quadruple-clicked the summit button.. weird. Edited*
Comment #13
ptsimard CreditAttribution: ptsimard commentedWow. My mouse quadruple-clicked the summit button.. weird. Edited*
Comment #14
daveferrara1 CreditAttribution: daveferrara1 commentedThis can't patch can't be committed at this time like this.
The main reason is the api version requirement. That needs to be set by default to a value that is consistent with what is returned by Facebook now. Looks to me like someone upgrading module versions would have to go set that value or it fails. About ~1000 sites use the module so we have to consider someone upgrading.
This is more like a new version than an update - maybe we make it an alpha.
Comment #15
darvanenI thoroughly agree.
Comment #16
ptsimard CreditAttribution: ptsimard commentedHello,
While I understand your concerns and would prefer to be fully compatible, I currently don't have the time to improve it in a backward compatible way (crunch time). But I wanted to contribute back the latest some improvements I did. Hopefully you can find them useful.
Also I understand that this tread might not be the best place for random improvements, but since my work used Darvanen's patch as a starting point I feel I should post this next patch here.
Bottom line for patch #16 is:
Comment #17
darvanenThanks for the work you *have* done, my patch was a very rough beginning.
I think Dave is suggesting that it should be the basis for a new major version (7.x-3.0 alpha 1), for reasons beyond your control, and it is that which I agree with.
Comment #18
fabienlege CreditAttribution: fabienlege commentedPatch not working anymore, same on develop branch. Any news for this bug ?
Comment #19
daveferrara1 CreditAttribution: daveferrara1 commentedPlans is to use this patch as an example for a new D7 version. I wouldn't path the current release with it and expect it to work. Also a D8 version in the works as well. January probably on both of those.