Closed (works as designed)
Project:
Facebook-style Statuses (Microblog)
Version:
6.x-2.x-dev
Component:
Code - Functionality
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2009 at 18:52 UTC
Updated:
19 Jan 2011 at 21:14 UTC
Jump to comment: Most recent file
Comments
Comment #1
icecreamyou commentedFrom the top of the module page:
Comment #2
igorik commentedops, sorry, I didn't notice it before.
however, thanks for your answer and for your work on this nice module.
Comment #3
icecreamyou commentedThanks--
If this is something you really want, I might suggest opening an issue on fbconnect. Since the purpose of fbconnect is to import information from Facebook, it seems logical to assume that fbconnect should do the importing.
Comment #4
merilainen commentedIs it possible from another module? I don't have much experience on making Drupal modules, but I tried to make my own module which would integrate with facebook_status and give the user an option to update the status also to Facebook. Here is my patch which works if the Drupal for Facebook module is configured properly and user has linked the Drupal and Facebook accounts. The patch is for 2.x-dev, but I don't want to change the version since this issue is in "won't fix" state.
If patching is not the right way to go, maybe you could give a hint how to hook into the facebook_status_box_submit() function in my own module?
Comment #5
icecreamyou commentedmrErilainen, thanks for the patch, it's great that you were able to get this to work.
It looks like your patch causes statuses posted on Drupal to update the user's status on Facebook, but not vice versa. That seemed to be a request of the original poster, and if possible may be something to consider in the future.
A couple of comments on your patch:
- Any variables introduced ('facebook_status_fbupdate') should be deleted when the module is uninstalled (via hook_uninstall() in facebook_status.install)
- I am against including an icon in the checkbox for a variety of reasons (hotlinking is bad, images take up additional space, users should have the ability to choose their own icon and that gets complicated). If users really want that, they can theme it in with CSS or a hook_form_alter().
- The "Let users update Facebook status" setting should mirror the "Default Twitter option" setting, with the same options. That includes giving users the ability to set what they want the default value of the "Share on Facebook" checkbox to be, if the administrator allows this.
- The "Share on Facebook" checkbox needs to be themed with CSS to make it float in the appropriate place on the status update form. See the CSS for the Twitter checkbox.
- I don't know what this does:
isset($GLOBALS['fb']) && fb_facebook_user()so I would like a code comment there.- Either "Share on Facebook" should be changed to "Post to Facebook" to match the Twitter checkbox or the Twitter checkbox should be changed to "Share on Twitter." They need to be consistent.
- If a code comment is a complete sentence, it should end in a period (see the snippet below).
- There's no need for the intermediate $user_message variable here, and it should also check to ensure that the fb module exists:
- To be clear, is there any particular reason you are using the fb module instead of fbconnect? Should you actually be checking that the fb_connect submodule is enabled instead of fb itself?
Also, I am planning to split the Twitter integration into a separate module, so I would prefer if this Facebook integration were in a separate module as well. To add/change/remove forms, you will need to utilize hook_form_alter() (or its brother, hook_form_FORM_ID_alter()). To add a submit callback to a form, add a line like this inside your hook_form_alter():
That callback will then be called when the form is submitted just like the default callback. For an example, see the facebook_status_form_twitter_account_list_form_alter() function (line 319 of facebook_status.module in the current dev).
If you need any additional help with this, I will be more than happy to assist you, whether you want to contact me by email (from my drupal.org contact form) or open a new issue in the queue. When you are satisfied with the module and are ready to post it to drupal.org, let me know the link to your CVS application and I will vouch for the validity of your project as well as list it on the FBSS project page.
If you're really having trouble with turning this into a module, I will still consider a patch if you update your patch to fix the issues I identified above. However, I would very much prefer if this were its own module.
Comment #6
pribeh commentedHi IceCreamYou, I was just wondering what your plans for this type of integration was since you mention the potential of inserting it into a separate sub-module? I recently submitted this as a request in the FBConnect queue (http://drupal.org/node/749612). I would love to help contribute to streamlining this. Two submodules for both Twitter integration and FBConnect would be ideal. I also realize that being able to support Drupal for Facebook is probably an option that some will want. I'm willing to switch over to using DFB if need be but currently prefer the FBConnect platform.
Comment #7
pribeh commentedOh, I forgot to thank mErilainen for starting work on this :)
Comment #8
icecreamyou commentedmErilainen has been developing the module I described and will be applying for a CVS account to post it on drupal.org when he is finished.
I am going to break Twitter integration into a separate module for Twitter 3.x once #571802: Import tweets from Twitter to Facebook-style Statuses lands and Twitter 3.x becomes the recommended branch. (And, of course, I get the time.)
Comment #9
pribeh commentedAmazing.
Comment #10
merilainen commentedHere is my module which will enable the checkbox similar to Post to Twitter to post your status also to Facebook. I will apply for CVS account soon, but there are some things to fix before I do that. So this is just for those who are interested to try it out. For me it works if you have Drupal for Facebook and the dependencies enabled which this module has.
Things missing:
- Setting for the user to choose if the checkbox should be enabled by default or not
- Some form weights to place the checkbox and the settings in facebook_status settings to right order
- Sometimes I get some error messages from Drupal for Facebook about canvas pages (under investigation)
Any feedback is appreciated, but please don't write here if you have problems to keep this issue nice and short. Instead you can contact me. I'm currently working on full Facebook integration to get new content, comments and other activity to a Facebook page (or user wall), but that will be another module not related to facebook_status.
Comment #11
icecreamyou commentedThe admin settings form elements now have weights (just committed to CVS). Will review the module by email later.
Comment #12
summit commentedHi Joonas,
Do I need to put the status_fb module within the fbconnect module as a submodule, or is it standalone module?
greetings, Martijn
Comment #13
merilainen commentedIt is a standalone module and has the Drupal for Facebook module as dependency.
Before doing any further development, I'm waiting for fb-module to update to see how things will change now that Facebook announced the Open Graph API.
Comment #14
Scott J commentedThanks for a great idea.
If anyone has this working, please share your setup, fb module versions etc.
Comment #16
tinohuda commentedGreat idea.
Comment #17
g.k commented+1
Comment #18
eme commentedSeems a lot of things have changed :
I think dependencies in the .info module goes from
dependencies[] = facebook_status
dependencies[] = fb
dependencies[] = fb_connect
dependencies[] = fbconnect_stream_publish
to
dependencies[] = facebook_status
dependencies[] = fbconnect
dependencies[] = fbconnect_stream_publish
In status_fb_status_submit, the function fbconnect_stream_publish_render_js should be used (which suppose to load the js by calling drupal_add_js(drupal_get_path('module', 'fbconnect_stream_publish') .'/fbconnect_stream_publish.js');).
Next, it seems that these things needs to be addressed :
- $GLOBALS['fb'] does not seem to exist anymore, same for fb_facebook_user(). I have withdrawed it for the moment. Don't know if there is a need for that...
- There is no preset in fb connect stream for a facebook status. I used the node one, but the url should be chosen carrefully.
Here are first rewrites for those who want to begin re-testing it.
Comment #19
icecreamyou commentedFWIW, work on the module from #10 has been continued in #1018182: Integration with facebook_status
Comment #20
eme commentedThanks for telling me. I did not know that. But is it really necessary to go through a third module while this one works cleanly with just facebook connect?
Comment #21
icecreamyou commentedI don't know, I didn't write it, I haven't tested either version, and I will not be the one maintaining either version. If anyone comes up with a fully working solution, I encourage you to submit it as its own project on Drupal.org. However I also encourage anyone working on a solution to collaborate.
Comment #22
pribeh commentedmErilainen is working on a version (that integrates with DFF) that we hope to share on Drupal.org soon. I've mentioned this thread to him.
Comment #23
merilainen commentedI think it's possible to use either module, fb or fbconnect, for posting status updates to Facebook. But how to declare dependencies with an "OR" relation in the .info file? Either fb OR fbconnect have to be enabled. In code it's pretty simple to check which module is enabled, and then call for the right function.
I decided to go with fb module because you can do so much more than with fbconnect.
Comment #24
eme commentedWell, good question. My guess would be to implement it and document the readme. But as a matter of fact, it will depend on wether you want to implement special functionnalities that do require drupal for facebook and are not possible with facebook connect. If yes, it is indeed normal to stick with Drupal for facebook.
Comment #25
icecreamyou commentedFWIW, I will accept a patch against the 3.x branch for integration with either fb or fbconnect (or preferably both)... (the 3.x branch is unstable and in CVS only right now)