Closed (fixed)
Project:
Drupal for Facebook
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2008 at 21:04 UTC
Updated:
9 Apr 2012 at 18:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cattech commentedI read a comment stating that we could still using drupal for facebook even though the api is php4, but the module will throw errors. How close is the 6.x drupal for facebook to completion? Is it worth trying to get the 5.x version to work with 6.x?
Comment #2
Passionate_Lass commentedsubscribing.
I'm not 100% sure this is what I need but I hope you can answer me. I'm looking for a way to "share" or post -any- content on my drupal site on the sister facebook group (and livejournal community). From what you have it sounds like this permits you to create an application where members who are facebook addicts can add it and follow your content that way... Would this work for what I am looking for?
Comment #3
balord commentedIt's not perfect, but I have ported a working draft of Drupal for Facebook to 6.x. The attached code installs the same way as 5.x (read the README) and is current with Dave Cohen's CVS commits thru #115258 posted on May 7, 2008. I have fb, fb_app, fb_canvas, fb_devel, fb_form, fb_infinite, and fb_user successfully installed. They co-exist nicely with other modules: auto_nodetitle, coder, devel, globalredirect, pathauto, token, and a custom nodetype of my own.
There are still some significant "known" issues in my 6.x port, but I think most stem from the
custom_url_rewrite()function in fb_settings.inc. In 6.x, that function split intocustom_url_rewrite_inbound()andcustom_url_rewrite_outbound(), and I just don't think I have a broad enough grasp of Drupal yet to trace where it's going wrong. I've gotten the whole project this far, please could some fresh eyes shed some light on this?Bugs I've found and not yet solved:
custom_url_rewrite_inbound()in fb_settings.inc orfb_canvas_form_alter()and helper function_fb_canvas_make_form_action_local()in fb_canvas.module.fb_canvas_process()in fb_canvas.module is not rewriting img tags, namely the fb_fbml logo.png file (array value $output['logo']). Again, could be related tocustom_url_rewrite_(in/out)bound()? Facebook will complain until you uncheck "Logo" in the fb_fbml theme settings.fb_fbml_menu_local_tasks()in template.php is crippled for now to just output blank tabs. It calls the functionmenu_get_active_nontask_item(), which disappeared in 6.x, and I just don't understand the menu_ functions in 6.x enough yet to rewrite this function.I am out of steam troubleshooting this port, and gone for the next week anyway. I wanted to post what I had so far, and I hope my work will help jumpstart a full-fledged 6.x-dev branch.
Comment #4
Dave Cohen commentedBrent, thanks very much for this. Any chance you could submit a proper patch? http://drupal.org/patch/create
Sounds like a number of those issues will be fixed when the url rewrite code works. That stuff is quite tricky.
Comment #5
balord commentedOkee, here's an attempt at patches. Created in TextMate. Let me know how I did. :) Would you prefer them all in one file?
I forgot to mention in my earlier post that I started with a clean install of fb. There might be issues when migrating a 5.x FB app to 6.x. Add that to the list for code-review time.
Only had time today to Diff a few modules today. I wanted to cleanup any whitespace differences so the new code was clear. For now, fb and fb_app, along with the .inc files, fb_session and fb_settings, and the README.txt just for kicks.
(UPDATE 5/15: .patch extensions now instead of .diff.)
Comment #6
balord commentedHere are the rest. Since I haven't migrated all of the modules yet, one patch wouldn't address an entire fb install. Individual patches for just the components that are done remain the best option for now.
Comment #7
Dave Cohen commentedBalord, thank you for the patches. I appreciate it, even though there were some problems. Read up here: http://drupal.org/patch/create, and try to consolidate patches into a single file, as that makes them easier to apply. Several of your patches were "reversed", which my patch program can sometimes detect and handle, sometimes not.
I've attached a consolidated patch, although I have not tested it at all yet.
Also, do not add {brackets} to fql queries. That's a drupal-specific syntax and facebook apis will not handle it.
Again, thanks.
Comment #8
Dave Cohen commentedThis is still a ways off from actually working.
Comment #9
Dave Cohen commentedMinor improvements. Still far from working.
Comment #10
balord commentedHmmm - yeah, I looked back and did have a couple of the diffs backwards. I was in an airport trying to get all the whitespace to matchup one-by-one. I'm catching on to the tricks of being an efficient open-source citizen.
I will try for better diffs next time around, hopefully will take some more stabs at the code next week.
Comment #11
Dave Cohen commentedHere's an improved patch, but still needing work. I'm posting it here so it's not lost forever. However, this patch is for version 1 of DFF, and I expect the first version for Drupal 6.x to be DFF 2.x. So this patch may never be applied. It's based on the DRUPAL-5 branch (version 1.x for Drupal 5.x)
Version 1.x of DFF is built using the older facebook APIs. Version 2.x is for the newer profile and API.
Comment #12
dinis commentedSubscribing, excellent work :)
How far away do you think a 6.x branch is? I'm itching to start testing this hehe
Comment #13
Dave Cohen commentedIf you're itching, start testing with the patch above.
I'm not sure when I'll create the 6.x branch. It's a pain to support multiple branches.
Comment #14
japanitrat commentedsubscribing
Comment #15
reinholdlange commentedsubscribing
Comment #16
javajones commentedsubscribe
Comment #17
arlind commentedsubscribing
Comment #18
frankcarey commentedHey Dave,
How involved does a deadwood upgrade look to you from the 5.2.x release? I'm sure i could knock out the basics there. Also should we be moving to the PHP5 API exclusively in the 6 release?
Cheers
Comment #19
fumbling commentedSubscribing
Comment #20
igorik commentedsubscribing
Comment #21
troysabin commentedsubscribing
Comment #22
john.arroyo commentedsubscribe, looking forward to an official dev/beta version for D6
Comment #23
Dave Cohen commentedI've been too busy to keep up with the D6 patch. At the time of comment #11, the patch applied cleanly and was mostly functioning. There have been a number of changes to 5.x-2.x-dev since then. I know I'll update the patch sooner or later but recently there's been a lot on my plate.
@TextPlease I'm not sure what you mean by "deadwood upgrade". But I can say that Drupal for Facebook 5.x-2.x is PHP5 only. Largely because the new facebook php api is php5 only.
Comment #24
Dave Cohen commentedHere's an updated patch, for the latest Drupal for Facebook 2.x. It is not complete, and has not received a lot of testing, but it's certainly enough to get started on D6. I have a simple test app serving canvas pages with it.
I'm glad to see interest in this thread. Feel free to check out the latest fb modules from CVS, apply this patch and get started on Drupal 6.
Comment #25
saokar commentedAny chance I can get a zipped version (instead of the patch) ? thanks again.
Comment #26
dkruglyak commentedDave, when do you think 5.x-2.x-dev will be frozen/stabilized as a real release? If more changes are coming, how much is the D6 patch likely to suffer from obsolescence?
Comment #27
Dave Cohen commentedI can't say for certain, but my guess is that in January I'll make a D6 branch and from then work mainly with that branch. I'm on vacation the first two weeks of Jan, so probably right after that.
@saokar - you can find instructions on how to use cvs and patch files elsewhere on drupal.org.
Comment #28
batje commentedsubscribe
Comment #29
Jason Ruyle commentedsubscribe
Comment #30
provod commentedsubscribe
Comment #31
lillywolf commentedsubscribing
Comment #32
leon85321 commentedSubscribing
Comment #33
WildBill commentedsubscribing
Comment #34
Antinoo commentedsubscribing.
in the meanwhile, must the patch at #24 be used against 5.x-2.x-dev, right?
congrats for your work.
Comment #35
dkruglyak commented@Antinoo: If you plan to try the patch soon could you post here if it works and/or any code updates?
Comment #36
digger3d commentedGot it all from CVS
got redesign-changes from FB svn, modified settings.php
This is what I got "This version is incompatible with the 6.8 version of Drupal core."
probably have to apply the patch =)
I mean I am ready to contribute.
I have experience, my own OS project is here http://digger3d.com/modules.php?name=News&file=article&sid=19
Comment #37
digger3d commentedapplying the patch was a problem
|RCS file: /cvs/drupal-contrib/contributions/modules/fb/themes/fb_fbml/Attic/styles.tpl.php,v
|retrieving revision 1.9
|diff -u -r1.9 styles.tpl.php
|--- themes/fb_fbml/styles.tpl.php 1 Aug 2008 07:26:20 -0000 1.9
|+++ themes/fb_fbml/styles.tpl.php 1 Dec 2008 20:13:27 -0000
--------------------------
File to patch:
No file found--skip this patch? [n] y
Skipping patch...
Hunk #1 ignored at 1.
Hunk #2 ignored at 215.
2 out of 2 hunks ignored--saving rejects to fb_fbml/styles.tpl.php.rej
Can't create fb_fbml/styles.tpl.php.rej, output is in /tmp//patchr3S0fXZ: No such file or directory
Hmm... The next patch looks like a unified diff to me...
I am hoping it is not critical...
Comment #38
digger3d commentedit was not critical... after editing fb_settings.inc it seems to be working, going to disable debug output...
Brilliant job Dave! Thank you very much! Just point me where you need help the most.
Comment #39
PGiro commentedfollowing this
Comment #40
parrottvision commentedsubscribing
Comment #41
Dave Cohen commentedJust FYI, I'm on vacation till the middle of January. Hope to have an update to this issue near the end of Jan.
Comment #42
philbar commented+1
Comment #43
yoDon commentedlooking forward to it
Comment #44
socialnicheguru commentedsubscribing too
Comment #45
KingMoore commentedsubscribinating
Comment #46
pkej commentedsubscribing
Comment #47
youkho commentedSubscribing
Comment #48
adshill commentedDave,
I haven't had a chance to properly play with this but I watched your screencasts and checked the documentation... It looks GREAT.
So... I have a potential project it would be perfect for coming up in February (if our proposal is given the go-ahead) in which case I would be interested in sponsoring the development of the module and will also be able to help with testing. I'm not a coder so can't help on that front but if you contact me when you're back from hols with an idea of what kind of sponsorship (if any!) would be a help to you get this off the ground (Drupal 6 branch) as soon as possible then please let me know and I may be able to help. For sure once a D6 branch is available I'll help with testing, even if the commercial project doesn't go ahead.
Look forward to hearing from you,
Adam
Comment #49
adshill commentedJust out of interest... is this PAGES and PROFILE compatible?
Comment #50
gkapoor commentedsubscribe
Comment #51
socialnicheguru commentedDave, can you set up Chipin or PayPal so we can help sponsor the changes for D6? Chris
Comment #52
Dave Cohen commentedI appreciate the sponsorship offers and I'll set something up next week...
Yes, the modules support adding boxes to pages and profiles. Also news feed messages, etc...
Comment #53
adshill commentedGreat. For sure we will make an initial contribution that could be upped if we get the contract I mentioned.
Hope you had a good holiday :)
Adam
Comment #54
gkapoor commentedI'm using Facebook Auth module for single sign on to our web site.
http://drupal.org/project/facebook_auth
Will this module going to provide a upgrade path so that current user who have associated their Facebook IDs can use it?
Thanks,
=gk
Comment #55
jboeger commentedpolitely subscribing!
Comment #56
patcon commentedAny chance of someone posting an unrolled version of this patch. I've spent the last 5 hours learning how to unroll it, then manually fixing a bunch of errors that occurred for some reason when applying the patch (mostly in the info files), plus the regular set up time. It's still not working. I could normally live with this, since it seems it's not nearly ready for release, but I remain restless because I'm unsure whether it's my patching skills or something other issue!
While I'm at it, I found these things:
- fb_canvas.module was still using $may_cache in a menu hook, which was deprecated in D6. I just removed that argument and that warning went away.
- After updating the settings.php file (as indicated in the README), a bunch of repeats of "fb_settings_url_rewrite_inbound(node, node, )" occurred at the very top of every page. Sometimes "node" was replaced with "calendar" (which I have installed). This seems to have come from a line in fb_settings.inc where the coder tried to provide a replacement for the fact that the function custom_url_rewrite_inbound was dropped in D6. If you search for "function fb_settings_url_rewrite_inbound", you'll see that several lines into it, there is a print command for the exact line that was repeated a bunch at the top of my page. I just commented that one line out. Not sure if this caused problems later... but the garbage went away.
- Finally, once I set up my facebook app page, with basically the same settings as I had in my D5 setup (which worked), I got this error on the facebook application page (which was obviously passed through from drupal):
Fatal error: Unsupported operand types in [ROOT]/includes/common.inc on line 1369
On searching for this error, it appears to have something to do with upgrading to D6.7 or D6.8 (conjectured from this thread: http://drupal.org/node/346756)
So anyway, I might be wrong or way off base in much of this guesswork -- I'm really new to this! But anyway, didn't want these last few hours to be completely for naught, so if it helps anyone else, then great! :)
Comment #57
frdesign commentedsubscribing :->
Comment #58
Civil commentedI am also anxious to start trying this on 6.8. I hope to apply the patch tonight and see how it goes.
Comment #59
Civil commentedI patched against fb-5.x-2.x-dev and received several errors. My admin/modules area still reported the version as 5.x, so the patch was not successful. What code should this be applied to?
The errors I received are attached for reference.
I am using Drupal 6.8
Comment #60
gallamine commentedsubscribe
Comment #61
patcon commentedSame errors I received civil. Looking over the error dump files, you can see that it's mostly just updating the info files with the core version and the new format for dependencies (using arrays). Update all those manually by looking at the error dumps. The only odd one out is the feed module file, which messes up in replacing a function, but this can also be fixed manually. Just read my post above when the other errors occur after this. For the record, I'm also using drupal 6.8
Comment #62
michaelday commentedSubscribing
Comment #63
Dave Cohen commentedHere a re-rolled patch against the latest.
Anyone serious about sponsoring some of this development please contact me. I'll post some details Monday about several tasks that need sponsorship and/or volunteers.
Comment #64
barry769 commentedsubscribing
Comment #65
georgedamonkey commentedSubscribing
Comment #66
Anonymous (not verified) commentedSubscribing
Comment #67
adshill commentedJust for information - I'm sure Dave will update soon, but he has put the details for what needs sponsoring on his website - as someone who can't help on the PHP front but hopes to contribute to this fundraising, I'm urging all who have a sincere want to see this development through to see if they can help in any way :)
Here is the link: http://www.dave-cohen.com/node/3033
Comment #68
verikami commentedjoining :-)
Comment #69
leovarg commentedSubscribing
Comment #70
frankcarey commentedsubscribing
Comment #71
Dave Cohen commentedThis update fixes some calls to url() which used the outdated set of parameters.
Comment #72
dkruglyak commentedCan we create D6 dev release for more consistent testing?
Comment #73
Dave Cohen commentedMy plan is to create a D6 branch in the next week or two. From then on all development will be D6 based. But there are still a couple things I want working better in the D5 branch. I don't want to develop on two branches concurrently.
I've just added a fbconnect login block to the D5 branch. I think there are some bugs around logout and account creation. When these are resolved I'll make the cvs HEAD be the D6 version and have a D6 dev release.
Comment #74
aaronbaumandoes anyone have an all rolled up version of fb-6.x, complete with all these diffs included to save me the hassle?
also, subscribe
Comment #75
unclejens commentedsubscribe
Comment #76
Dave Cohen commentedI've recently checked in a number of improvements to the 5.x branch, including fixes to Facebook Connect login block and related session management issues. Also some support for showing feed dialogs. So, the patch for Drupal 6.x is out of date again. I plan to update it over the weekend, so stay tuned.
If this issue is important to you, please sponsor the project. Most of the development has been my volunteer effort. Although clients have commissioned specific features in the past, I have no client specifically sponsoring the Drupal 6.x port or Facebook Connect features. I'm hoping the community as a whole can contribute towards these features. Thanks for considering it.
Comment #77
philbar commentedThanks for the time your putting into this project, Dave. I really appreciate it and to show my gratitude I made a small contribution of $20. I wish I could give more, but funds are tight at this point. Hopefully when I establish my start-up I will have enough revenue to support projects like this.
As a side note, the feature I would like most in D6 is displaying 1 line stories in the user's profile feed on facebook when the user performs an action on my drupal site.
Comment #78
humble.techy commentedsubscribe
Comment #79
Dave Cohen commentedre-rolled. Still not including some important modules...
Comment #80
Dave Cohen commentedAdded fb_connect.module, with Facebook Connect login block.
Comment #81
noizyboy commentedsubscribe
Comment #82
Dave Cohen commentedI've created a DRUPAL-5--2 branch for Drupal 5.x continued development (bug fixes)
Drupal HEAD is now Drupal 6.x code. Attached is the patch, just for posterity.
This is still a devel release, the views and actions modules are not yet updated. So I'll keep this issue active...
Comment #83
Dave Cohen commentedWell, I tried to create a DRUPAL-5--2 branch, and I'm trying to check in the 6.x code to CVS HEAD. But I screwed things up, and I get this error whenever I try:
Message: cvs commit: sticky tag `HEAD' for file `README.txt' is not a branchIf anyone knows what cvs command might get past this problem, please let me know. I want to be able to commit changes to HEAD.
Comment #84
Dave Cohen commentedI think I solved the cvs issues. The previous patch file is checked into the HEAD branch. Again, leaving this issue open because there's still work to be done on the 6.x version.
Comment #85
qbnflaco commentedsubscribe
Comment #86
socialnicheguru commentedI don't think it has been committed. Or at least I am not seeing it on the project page.
Comment #87
Dave Cohen commentedIt was not on the page until now. I had to check a box on the release admin page here on drupal.org. You should see it now.
Comment #88
jax commentedSubscribing. You might want to create multiple tickets for each of the tasks for D6 to make it easier for people to help.
Is there any D6 documentation available since I was not able to achieve anything except having facebook connect to drupal and giving me the error
FBML Error (line 23): illegal tag "body" under "fb:canvas"which means it probably got the front page with the normal theme in stead of the fb_fbml theme (which is activated)?Comment #89
Dave Cohen commentedBy all means, anyone with an issue should submit a new one. This issue is not closed because the actions and views modules are not yet ported to D6. So I don't consider this work complete.
The D6 version is usable. Although no one will get very far without reading the README.txt. Just because its long does not mean it should be skipped.
I've checked in a number of improvements to the D5 branch this week. Will port them to D6 over the next few days...
Comment #90
jax commentedWell, I've read the README. The troubleshooting for the issue I am having says to lower the weight for fb.module. Here's the relevant output of the system table:
But I see settings.inc checks for
$_GET['q']for a key but when facebook calls my URL it's a POST. Anyway, this is becoming a support post and this is not the right place for that. My guess is that I'm inputting an incorrectCanvas Callback URLand I can't seem to find what it should be in the docs.Comment #91
rjmackay commentedAny progress on porting the views and actions modules?
I might start looking into porting those myself - but not sure how much time it'll take yet.
Comment #92
Dave Cohen commentedHey, I have not upgraded them. And I won't, until I have a pressing need, which hasn't happened yet, obviously.
I'd appreciate you taking a stab at it. Personally I think the views module is more important. There's really only one argument handler in there. I just haven't had time to learn the new views API.
Comment #93
psi-borg commentedsubscribing
Comment #94
justadropofwater commentedsubscribing
Comment #95
b777 commentedsubscribing
Comment #96
totaldrupal commentedIs my understanding correct that without actions for D6 there is no posting of nodes to facebook?
Also it seems like there is not any other module that will do this, is this also true?
Comment #97
pyrello commentedYou'll probably want to take a look at this thread. It looks like the way that publishing to facebook is handled is changing.
http://drupal.org/node/447610
Hope that helps. I was able to get it working on my site: http://www.ournewspaperarchive.com - it is only visible to facebook users.
Sean
Comment #98
nirad commentedsubscribing
Comment #99
deltab commented@pyrello, how did you get it working on your site? Some step-by-step instructions can help here.
Comment #100
pyrello commentedSure.
That's it. Your node and comment forms should now have a checkbox with "share to facebook" after it that is defaulted to checked. When the user saves the post, it triggers a pop-up that prompts them to publish it to facebook too. I added the following css class to my checkbox, which adds a little facebook favicon next to it to pretty it up a little bit:
Hope that helps!
And a question for the maintainter: Dave, is it necessary if you are providing the pop-up prompt to enable extended permissions for writing to the stream, or is that only for if you are going to do it without prompting them?
Comment #101
Dave Cohen commentedI understand that extended permission is only necessary if you want to write to the stream without prompting them. Let's keep that discussion in the other thread, though.
Regarding Drupal for Facebook on D6, the code is quite stable right now. I've moved some files into fb/contrib (implying less reliability/support) while modules in fb/ are Drupal for Facebook's "core". I will remove some obsolete code, then call it a beta release. So if you haven't updated your Drupal for Facebook in a while, I recommend doing it now, even though the version number has not yet changed.
Comment #102
deltab commented@pyrello, many thanks.
Dave, should this not be a part of fb_stream? with a UI to configure the templates?
Comment #103
psi-borg commentedhi pyrello. i followed the instructions you gave, nothing shows up on the nodes like at dff.o
the module is enabled, just added a dependency line on fb... are there other dependencies this would have that aren't listed?
all modules are current, core fb modules are enabled.
what else can you note that would make this work?
Comment #104
eric_a commentedfb_actions 6.x-2.0-beta2 still declares a dependency on actions. This makes it difficult to enable this module on a Drupal 6 site ;-).
If this module is cutt off on purpose then a note in fb_actions.info would be great... Thanks in advance.
Comment #105
eric_a commentedfb_actions 6.x-2.0-beta2 still declares a dependency on actions. This makes it difficult to enable this module on a Drupal 6 site ;-).
If this module is cutt off on purpose then a note in fb_actions.info would be great... Thanks in advance.
Comment #106
buffy commentedsubscribing
Comment #107
stieglitz commentedsubscribing
Comment #108
Dave Cohen commentedI've fixed fb_actions.info in the 6.x-2.x-dev version. Facebook has deprecated profile boxes, which were the primary reason for fb_actions.module. So right now, fb_actions.module does very little. I may eliminate it entirely, so if anyone still finds they need it, please let me know.
Comment #109
eric_a commentedActually, this would be very nice to have a simple sample action that sends messages to a Facebook Wall.
I am trying to use the fb API to to programmatically send node title links to someone's Wall on behave of my facebook app (or any facebook user for that matter).
So now I'm looking at fb_get_app(), fb_api_init() and fb_stream_publish_dialog(). I'm new to fb and facebook and wish I knew what I was doing :-)
It seems fb_stream needs fb_connect to get the javascript in the theme footer and than it could work?
Comment #110
Dave Cohen commentedEric_A, be sure to look at http://drupal.org/node/685320. And start a new thread if you need help with that.
If you have a standard Connect or Canvas page app, then your module can refer to the global
$fbor$fb_app. Almost no-one needs to call fb_get_app() or fb_api_init().Comment #111
ccshannon commentedsubscribe
Comment #112
Dave Cohen commentedJust released beta 4. Getting close...
Comment #113
Dave Cohen commentedTo those of you patiently following this progress...
I've just checked into the dev build significant changes to app administration. These changes touched a lot of files, so please be vocal if anything has broken. But BEAR THIS IN MIND...
Run update.php when you get the last code. AND manually edit and save each application! Sorry but I wasn't sure I could automate the change to callback urls. As usual the fb_devel.module is your best friend.
Also I've moved the application edit URLs around. Much to the relief of some of you, app data is no longer stored as a node. Instead go to admin >> build >> Facebook Apps.
So remember, update.php and manually submit each app! Either next time you download the .dev build, or when beta6 comes out (soon).
Comment #114
Dave Cohen commentedTo everyone working with the beta releases for 6.x....
When upgrading, especially beyond beta 10 or to a recent .dev builds, follow these upgrade instructions.
Recent changes will make the modules better, but the upgrade path requires some manual steps (beyond just update.php). See the new doc page for details. http://drupal.org/node/761886
(Note that right now, there is not yet a beta 11. So by "beyond beta 10" I mean the newest .dev release or cvs checkout.)
Comment #115
strae commentedSubscribing
Comment #117
strae commentedSpammers get nasty day after day..
Comment #118
YK85 commentedsubscribing
Comment #119
Dave Cohen commented6.x version has been out for a while.