Closed (fixed)
Project:
Twitter
Version:
7.x-3.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Apr 2010 at 17:18 UTC
Updated:
26 Sep 2011 at 19:26 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
BenK commentedSubscribing...
Comment #2
yngens commentedsubscribe
Comment #3
johngriffin commentedsubscribe
Comment #4
tsvenson commentedSubscribing, I am especially interested in the OAuth integration.
Comment #5
electroponix commentedvery interested also
Comment #6
khalor commented+1
Comment #7
XerraX commented+1
Comment #8
Cheek commentedsub
Comment #9
janis_lv commentedsup?
Comment #10
webchickHere's an initial patch from Coder Upgrade against the HEAD branch (which seems to be equivalent with 6--3).
I'm quite sure it won't work, so marking such. :P Playing with Coder Upgrade module.
Comment #11
aren cambre commentedsubscribe
Comment #12
beeradb commentedI also took a stab at this a while back in http://drupal.org/node/717786
D7 and twitter.module have both likely moved quite a bit since then, so I'm not sure how useful it will be, but it's worth taking a look at for people who need something now.
Comment #13
zoen commented+1
Comment #14
mason@thecodingdesigner.com commentedsubscribe
Comment #15
miklThis is onle of those issues that could use a Git repo, especially if the maintainers are too busy to work on this themselves…
Comment #16
encho commentedsubscribing
Comment #17
danvy commentedAny chance to get Drupal 7 support now that beta 1 is out ?
Comment #18
bstanfield commentedsubscribe
Comment #19
davebv commented+1
Comment #20
Andy B commentedsubscribe +1.
Does anybody have any other ideas that will work until twitter and oauth come out for d7?
Comment #21
McGo commentedAs written in http://drupal.org/node/807390#comment-3636624 I assume that the port to D7 will be hold until a stable D6 release of twitter is ready that uses OAuth 6.x-3.x?
On the Module homepage it says
So Twitter 3.x is already OAuth 3.x ready?
Comment #22
Andy B commentedI think oauth 3.0 compatibility should be in a new issue. This is D7 issue.
Comment #23
nightowl77 commentedsubscribe
Comment #24
flokli commentedsubscribe
Comment #25
kika commentedsubscribe
Comment #26
nwe_44 commentedsubscribing
Comment #27
jennifermontes commentedSubscribe
Comment #28
podaroksubscribe
Comment #29
mlncn commentedAnd joining the chorus of subscriptions.
Are the main devs waiting for their 3.x branch to stabilize first, or is lack of oauth in 7 holding things up, or could progress be made if someone steps up?
Comment #30
voxpelli commentedI've gotten no signals that the OAuth module is holding anything back here - if it is then I will try to push a D7 of it as soon as possible.
Comment #31
danny englanderSubscribing
Comment #32
dddbbb commentedSubscribing...
Comment #33
randomnets commentedSubscribing...
Comment #34
bjmac commentedSubscribing
Comment #35
timhomewood commentedSubscribe
Comment #36
Eebs commentedSubscribing
Comment #37
c-c-m commentedSubscribing
Comment #38
mcduarte2000 commentedSubscribing... I really wanted this module...
Comment #39
monjohn commentedSubscribing. It would be great if there were at least a branch created.
Comment #40
davemurphy commentedsubscribing
Comment #41
geekgirlweb commented+1 Subscribing
Comment #42
discursives commented+1 subscribe
Comment #43
BiosElement commented+1 subscribe
Comment #44
roam2345 commentedfollowing this one
Comment #45
cpettifer commentedsubscribing
Comment #46
juliusvaart commentedSubscribing
Comment #47
Anonymous (not verified) commentedSubscribing
Comment #48
exlin commented+1
Comment #49
luco commented+1
Comment #50
sw3b commentedSubscribing
Comment #51
lammertsm commentedsubscribing
Comment #52
jlporter commentedsub
Comment #53
nakedeyez commentedSubscribing
Comment #54
CSCharabaruk commentedsubscribing
Comment #55
andypost+1, anyone tried patch from #10 ?
Comment #56
Niklas Fiekas commentedSubscribe.
Comment #57
redhatmatt commented++1
Comment #58
dapen commentedsubscribe
Comment #59
luco commented@webchick I got the patch in #10 but, since HEAD has changed, I tried against twitter-6.x-2.6 (the last release before your patch). I know, I could have done this a little bit earlier :P
it didn't work even when I removed the relative paths. well, I can try another patch if you like - or I can learn to use Code Upgrader, whichever comes first ;]]
cheers
Comment #60
jonesrussell42 commentedsubscribe
Comment #61
Rj-dupe-1 commentedSubscribe
Comment #62
Sylvain Lasnier commentedSubscribe
Comment #63
hbk commentedfollowing this one
Comment #64
jlporter commentedcan the maintainer create a d7 branch, kind of silly that there are only random patches sitting around.
Comment #65
voxpelli commented@jlporter: There's no D7-version of the module so a branch would make no sense?
Comment #66
xurizaemon@jlporter: are there random patches other than the one by @webchick in #10?
I've kicked off some progress on Github, and if anyone else has made some please point me the right way so I'm not duping your efforts or making things worse :)
* https://github.com/GiantRobot/drupal-twitter
* https://github.com/GiantRobot/drupal-oauth
The latter a bit of work towards #807390: Port oauth to Drupal 7, but really I'm pretty ignorant of OAuth, so I'm probably just getting myself into trouble there. Fortunately @voxpelli is here and he can thwap me with a stick if he wants.
No, it doesn't work yet. Hopefully it's less broken than the current state of affairs though.
Comment #67
xurizaemonHere's the patch as it stands, because not everyone wants to come play on Github, but please note that (1) it's incomplete (2) you need the matching patch from #807390: Port oauth to Drupal 7 so you can have OAuth working (3) you should wear gloves or else you'll cut yourself on the pointy bits.
this patch is the whitespace-only cleanup which can also go into 6.x-3.x.
Comment #68
ogi commentedsubscribe
Comment #69
luco commented@grobot thanks! it's like the power rangers used to say, "a Giant Robot a day keeps the villains at bay".
well I'll get right on this :] should I look out for anything in particular? please let me know.
cheers
Comment #70
xurizaemon@luco, when I loaded it up last night it looked like it wasn't correctly enabling OAuth, because attempting to add a Twitter a/c to my user prompted for username/password.
Because configuring this module for OAuth was a bit of a fiddle in 6.x last time I had to do it (instructions buried in #404470: Authenticate Twitter_Actions.module via OAuth.module 2.x instead of Basic Auth?), some clear instructions for doing so in 7.x will probably help get more people testing this patch. That would be very helpful for someone to grab.
I'm confident that there must be issues with the related OAuth patch from #807390: Port oauth to Drupal 7 too.
Comment #71
luco commented@grobot I couldn't apply the patches, but was able to download the patched modules from github.
I can enable them, but on my user page, when I click on Twitter accounts, I get nothing.
maybe I'm missing something?
Comment #72
luco commented@grobot I've subscribed to #807390: Port oauth to Drupal 7 as well.
enabled OAuth Provider UI, and now when I edit my user account I geth the following error:
any ideas?
Comment #73
luco commentedoops. disabled OAuth Provider UI and now I can add twitter accounts... NOT.
tried to add without password and got this message:
btw my account isn't protected.
now when I enter my account *with* password, I get "Twitter authentication failed". I checked, my pwd is correct.
Comment #74
xurizaemonUpdate. This patch replaces the one in #67, and with the code from Twitter DRUPAL-6--3 patched with it, I can associate Twitter accounts with Drupal accounts, and delete them again.
(You'll need OAuth 7.x-3.x using the patch I'm about to add to #807390: Port oauth to Drupal 7 too.)
Comment #75
xurizaemonIf you see a username/password form at users/%/edit/twitter then your OAuth is not set up yet. Visit admin/config/twitter and register your site with Twitter as an application.
Basic Auth is long gone.
Comment #76
peter törnstrand commentedSubscribe.
Comment #77
boonep commentedsubscribe
Comment #78
tebb commentedSubscribing.
Comment #79
luco commented@grobot my first thought was to click Configuration and look up a "twitter" or "oauth" link. I never thought about visiting admin/config/twitter in the first place. but now that I have... I will never be the same again ;]
now seriously, it's easy to get lost with all those UI changes in D7...
anyway. I registered an app with twitter.com - also noticed that if you use the D7 overlay, you're not redirected to twitter for authentication when you add a twitter account. hope there's a workaround for that.
but I still got nothing. can't display my tweets in a block. any ideas?
cheers,
Luciano
Comment #80
xurizaemon@luco thanks for flagging the overlay issue.
No, I hadn't had a chance to test posting or fetching tweets, I'm sure there's still plenty to be done here :)
Comment #81
Jason Brain commentedsubscribe.
Comment #82
likewhoa commentedwhile patching twitter-6.x-dev with #74
Attached is a revised patch to fix the rejects. Apply this from your modules root folder.
Comment #83
xurizaemonThe patch in #74 is to be applied to DRUPAL-6--3, which is why you had rejections on the .info files (only).
Patch docs are at Creating patches (note "CVS example (2)" and "Check your directory!" - module patches should be made from the module dir) and Submitting patches (please read "Name your patch").
Please do not be discouraged by the above - I'm utterly delighted to see more than just a 'subscribe' email - your contribution is most welcome and this feedback is intended only to help you be more effective, and help prevent people being confused by multiple patches.
Comment #84
JamesSharpe commentedSubscribing
Comment #85
robxu9 commentedsubscribing.
Comment #86
davidbarratt commentedsubscribe... shouldn't there be a way to subscribe a thread without having to post a comment?
Comment #87
beeradb commented@davidbarrett see http://3281d.com/projects/improving-subscriptions for how you can help with this.
Comment #88
luco commentedit just occurred me that with DrupalCon just a month away, walkah might be very busy. and by that I mean "work coming out of his ears" busy.
probably that's why we haven't seen him in a while.
Comment #89
jlporter commentedCan the maintainer at least open a 7.x branch. Would be nice to not have to continuously patch against 6.x
Comment #90
danny englanderI don't know if this is an issue right now as it seems there has not been an update for the Drupal 6 version in some months + outstanding unsolved issues for that version.
Comment #91
jlporter commentedregardless it's preferable to at least have a 7.x-dev branch for more testing...you'll get 10x more testing with a -dev release over some patches in a long issue thread.
Comment #92
danny englander@jlporter - ah I see what you are saying, makes sense. :)
Comment #93
aren cambre commentedHas anyone asked walkah to be a co-maintainer? I sense there's enough talent here for at least one or more co-maintainers.
Comment #94
likewhoa commented@jlporter the patch i added in #82 can be applied from d7 on d6 copy of twitter.
Comment #95
xurizaemonThis update (includes previous patches) fixes some issues with filters in views.
Also includes a small workaround for PHP5.2 json_decode issues (#985544: {twitter}.twitter_id incompletely stored (final digits are zeroes) due to json_decode limitation in PHP<5.3 - maintainers I'm happy to post a copy of the patch with that excluded if you want).
As before, patch applies to DRUPAL-6--3 & prebuilt tarballs are available from my Github.
Still plenty to do, but you can now see your own tweets at user/%/tweets :)
Comment #96
luco commented@grobot I still can't add my account, even after removing the overlay - because of what I told you in #79. have both twitter and oauth enabled.
Comment #97
wickedskaman commentedsubscribing... yup.
Comment #98
cpettifer commentedAnyone come across www.supertweet.net? It provides a basic auth proxy to twitter. Not knowing much beyond that - would that help anyone get us up and running with twitter without the need for OAuth to be working?
Comment #99
l33tdawg commentedGrobot - damn good work mate
Comment #100
luco commentedis everyone seeing their tweets in user/%/tweets? I can't seem to be able to add a twitter account. really don't know what I'm missing here. any help is greatly appreciated. thanks :)
what I'm doing is:
1. enable both twitter and oauth;
2. visit http://twitter.com/apps/new;
3. register an app with the following settings:
- Application Website / Website / Callback URL are the same (just the website address)
- Application Type: Browser
- Default Access type: Read-only
- Use Twitter for login: Yes
4. go to admin/config/twitter and set:
- OAuth Consumer key;
- OAuth Consumer secret;
- Import Twitter statuses: Yes;
5. visit user/1/edit/twitter. click "Add account";
6. login to twitter. redirected to my website... and nothing. no tweets and my account won't show there :(
can anyone help me out? many thanks :)
Comment #101
likewhoa commented@cpettifer we shouldn't have to rely on a third party website for authentication, instead we should fix what's wrong with oauth
Comment #102
aren cambre commentedCan someone please get added to this project as a co-maintainer? Then we can start a true 7.x-3.x-dev branch and file separate issues instead of overloading this issue.
Comment #103
xurizaemonSorry Aren but we've still got a way to go before "needs review".
Luco I can confirm this works for me using my code as posted here & on github. I've used "read and write" for my Twitter app, otherwise my settings are the same as yours I believe.
* Are you getting accounts added to {twitter_account}?
* Do you have the view 'tweets' enabled @ admin/structure/views? (But it sounds like your account doesn't show on the edit screen either?)
Comment #104
xurizaemonLuco, I think I just found what had been setting you amiss while testing and documenting the process of setting this up on a new site. Your callback URL needs to include twitter/oauth (eg http://example.com/twitter/oauth) not just the site URL.
I don't have time to reroll against CVS right now (dodgy intwerwebs due to summer storms here) but the fix is on Github (just a one-line correction to make the callback URL show at admin/config/services/twitter). If anyone wants extra credits (I was going to give away a bucket of fries to lucky poster #100 but missed it) they can update the patch in #95 with this.
Without further ado: Instructions for getting your Tweets loading and having a site you can test with! If it works, that is :P
1. Install Drupal 7
2. Fetch Twitter module, either CVS DRUPAL-6--3 + my latest patch from #780712: Port twitter to Drupal 7, or prepatched from github
3. Fetch OAuth module, either CVS HEAD + my latest patch from #807390: Port oauth to Drupal 7, or prepatched from github
4. Fetch Views 7.x-3.x and CTools 7.x-1.x (latest recommended 7.x tarball of each)
5. Enable CTools, OAuth, Twitter, Views, Views UI
6. Visit admin/config/services/twitter and hit the "new app" link
7. Set up a Twitter app. apptype=browser, callback URL=as supplied, access=read/write, login=yes
8. Copy your consumer key and secret back from twitter.com and save
9. Visit user/1/edit/twitter directly (to disable the overlay) and use the 'add account' button
10. Authorise Twitter for this app.
11. Verify that your Twitter a/c appears at user/1/edit/twitter
12. Run cron
13. You should see your latest tweets @ user/1/tweets
EDIT: Updated to reflect path change from next patch.
Comment #105
xurizaemonUpdated patch with callback URL fix on config screen, also moves config screen from admin/config/twitter to admin/config/services/twitter
(Speak now if you think "Web Services" is not the right IA category for Twitter on the admin/config screen. I'm not 100% on that.)
Comment #106
Anonymous (not verified) commentedsubscribing
Comment #107
luco commented@grobot gonna test your latest version right away ~/o/ WHOSH
oh an I was the 100th poster. I want my bucket o' fries! LOL
in fact, make it a personal delivery. come to Brazil on the next couple of days and you'll enjoy Carnaval\o/
Comment #108
luco commented@grobot, I think Web Services is the right place right, IA-wise. after all, twitter is a web service.
also thanks for displaying the callback URL. makes it much easier :]
last but not least, I can see my account has been added, but my tweets won't display. I got this error:
any ideas?
anyway thanks for the help so far :]]
Comment #109
goldlilys commentedSubscribing
Comment #110
luco commented@grobot, I got my tweets showing - not only on my user page, but I managed to replicate the views block and create a user-independent version to show all tweets. yes!
thank you very much for your leadership on the matter.
I think I still hadn't made it because of cache, but I remember having cleared it. oh well. if it ain't broke...
Comment #111
berdirJust going through the patch, a few hints...
In core, most of these if statements where changed to save the result of fetchField() in a $var on a separate line before the if and then just do if ($var). Much more readable.
Trailing whitespace here.
You can do this directly with fetchAssoc(). $values = db_query('...')->fetchAssoc():
Looks fine technically. Only a coding style issue, you should indent changed method calls by two spaces.
Needs to be converted to db_delete().
Untested:
Dynamic stuff like this is where the new database layer is really awesome :)
files[] declarations are only necessary for files that contain clases. In your case, certainly the views stuff and maybe the lib.php file, not sure what's in there.
Looks good. According to the Coding standard, you can write the array on a single line if you only have a single entry in it, but it's fine like this too.
Maintain old update functions is really complicated and hard to test. For example, $ret is gone and shouldn't be used anymore.
My suggestion: Implement hook_update_last_removed(), return the highest update function number of the module and remove these functions. This way, users are forced to update to the most recent D6 version first.
This could be something you might want to keep, if you want to allow upgrading from 6.x-2.x and 6.x-3.x. Not necessary though, especially if 6.x-3.x is stable fore 7.x-* is.
OK :)
NORMAL_ITEM is the default, so you don't really need to specify it. Doesn't hurt...
Looks good.
Dynamic stuff like this should be converted to use db_select().
Untested:
FALSE is the getsize argument, you only need to specificy that, see http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_image. (map the order of the arguments to the name)
Since you touch that line anyway, you could move that comment on separate lines before the if and break it at 80 chars.
This one needs a bit work. You can only use fields for static values that come from page, this is an expression.
Instead of fields(), use "expression('is_global', '(1 - is_global))". See http://api.drupal.org/api/drupal/includes--database--query.inc/function/...
You can remove this hook, views now finds it's handlers through the files[] definition in the .info file.
Same here, this shouldn't be necessary.
Same here :)
Looks like this hasn't been update to the services URL
Once again, not necessary :)
Same here, looks like you want to update this.
The second argument is alt, not width :)
FALSE is the getsize argument, you only need to specificy that, see http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_image.
Powered by Dreditor.
Comment #112
jlporter commentedIs there seriously still not a 7.x branch yet?! A dozen patches in an issue queue are useless,messy, and targeted to patch the 6.x branch.
Comment #113
xurizaemonI hear your frustration @jlporter, but there's plenty of work to do before we have code worth committing.
Yes, the patches are against DRUPAL-6--2 as that's the latest version of the code (HEAD is 1yr behind). You only need the latest patch - all the patches I've posted are cumulative. If you'd rather download a tarball, just use Github version.
@all: Berdir has posted plenty of low-hanging fruit you can work on in #111. You can help right now by forking my existing work on Github, applying some of Berdir's recommendations, and creating a pull request. At least some of what you do will be good practice for d.o git migration too :)
http://github.com/GiantRobot/drupal-twitter
http://github.com/GiantRobot/drupal-oauth
Comment #114
shinz83 commentedsubscribe
Comment #115
dre2phresh commentedSubscribing
Comment #116
BenK commentedFor those who need a simpler integration with Twitter on Drupal 7, you should check out the Janrain Engage module (http://drupal.org/project/rpx). There's already been one stable release for D7 and the development of new features is proceeding very quickly.
The Janrain Engage module supports integration with Twitter, Facebook, Myspace, Google, Yahoo!, and many other identity providers. (Currently, 18 different social networks and service providers are supported.) You can also choose to just use the Twitter integration features if you prefer.
The great thing about the module is that both authentication (logging in) and tweeting (posting back Drupal content and comments to Twitter) is supported out of the box if you enable those features.
Cheers,
Ben
Comment #117
Seldon commentedsubscribe
Comment #118
xurizaemonThanks DaveReid for grabbing most of the fixes suggested by Berdir in #111, as well as a few other things added in this patch.
Comment #119
georgedamonkey commentedsubscribe
Comment #120
opisubscribing too
Comment #121
aristeides commentedsubscribing
Comment #122
Shadlington commentedSubscribing
Comment #123
john.oltman commentedsubscribe
Comment #124
alayham commentedsub
Comment #125
alayham commentedinstalled both modules fron github, twitter app works well, and pulls tweets to user profiles. but when I enable the twitter actions modules, I get this error
after some research, it looks like twitter should upgrade the rules integration features...
Comment #126
ilya1st commentedsubscribing
Comment #127
dcmistry commentedSubscribe
Comment #128
calte commentedsubscribing.
Comment #129
off commentedSubscribe
Comment #130
radj commented+1
Comment #131
bronzehedwickSubscribe
Comment #134
chriz001 commentedsubscribe
Comment #135
craigritchie commentedsubscribe
Comment #136
bartk commentedsubscribe
Comment #137
Shaque commentedsubbing
Comment #138
Marc Bijl commentedSubscribe
Comment #139
gbrands commentedSubscribing
Comment #140
bensnyder commentedsubscribe
Comment #141
dandaman commentedHow about a patch that we can use from one of the current Git branches on Drupal.org? Well, that'd be easier for me to test, at least.
Comment #142
xurizaemonQuick re-roll of #118, which no longer (?) applied cleanly.
Mostly the conflicts were in .info files anyway, but there was a coder "please doc func" in twitter.views_default.inc and a bit of cleanup in twitter_signin.pages.inc which didn't apply cleanly from #118 either. Which is a bit patchy (ahaha) as I thought I was working from "proper" DRUPAL-6--3 in my Github repo. But anyway, based on feedback to date I'm comfortable with a big 'ol ugly patch that Just Works. And OK with Mostly Works. I'm happy to provide patches with the #985544: {twitter}.twitter_id incompletely stored (final digits are zeroes) due to json_decode limitation in PHP<5.3 removed etc (as per #95) if there's need.
NB: This patch applies against 6.x-3.x as it's the most up to date branch.
Comment #143
dandaman commentedNice! I was able to apply that patch and it's working to some extent. I'll have to do a bit more testing and debugging.
Comment #144
Argus commented+1
Comment #145
nimzie commentedsubscribe
Comment #146
kenheim commentedsubscribe
Comment #147
Stephen Rockwell commentedsubscribing
Comment #148
gbrands commentedIf anyone is having trouble figuring out why POST doesn't work with oAuth (and probably without) you have to change the drupal_http_request() function paramters to be D7 compliant:
This is around line 240 or so in twitter.lib.php
I will see what I can do about a patch later.
Comment #149
lelandnielsen commentedSubscribing
Comment #150
monican commentedsubscribing
Comment #151
math-hew commentedsubscribe
Comment #152
pbz1912 commentedsubscribe
Comment #153
sunShould be converted into a db_merge() query.
Unclear what this @todo talks about. Either clarify or remove.
db_merge() here, too.
1) Let's add an optional \s* before the value.
2) The integer value should actually exist, so [0-9]* needs to be [0-9]+
3) Is it guaranteed that there are double-quotes, not single-quotes?
Coding standards.
Typo.
Description should be the title and description can be removed afterwards.
1) The latter needs a helper stub function that passes the alternate prefix to the process callback.
2) Ideally, all filter functions should be consistently named twitter_filter_*()
1) addField() can be replaced with a chained ->fields().
2) The ta.uid condition is added unconditionally and then twice in both cases; looks like an oversight.
The variable assignment is needless; move the $query->execute()->fetchCol() directly into the foreach control construct.
Should use
instead.
I don't know the details here, but this sounds like simply setting
should do the trick, instead of the cumbersome wrapper function and/or any manual assignment of #post/input.
Don't forget to remove that #post assignment line, btw.
Coding standards.
Using #method GET should also make this drupal_goto() obsolete.
Separate issue: This should be a theme function, and all the variables should be prepared in a theme preprocess function.
Looks like a checkbox.
--
RTBC after these changes.
However, not sure whether we need to take the new 3.x of http://drupal.org/project/oauth into account? Anyway, let's make progress here.
Powered by Dreditor.
Comment #154
craigritchie commentedCommit!!!! :)
Comment #155
titaniumbones commentedsubscribing
Comment #156
monican commentedSub
Comment #157
mikejonesok commented+1
Comment #158
mattbk commentedSuperscribing.
Comment #159
dwhutton commentedsubscribe
Comment #160
Greg Varga commentedSubscribing
Comment #161
patlo commentedsubscribe
Comment #162
jjma commentedsubscribe
Comment #163
alienseer23 commented+1
Comment #164
Audiolith commented+1
Comment #165
agerson commentedSubscribing
Comment #166
erdembey commentedsubscribe
Comment #167
yugongtian commented+1
Comment #168
Fidelix commentedSubscribing...
Comment #169
7wonders commented+1
Comment #170
jaialin commentedbump!
Comment #171
xurizaemonHaven't forgotten. Review in #153 is great and have
mostsome of that applied, but in doing so a couple of other things came up which will need a bit of review. Will try to post an updated patch in the next day or so.My sandbox is @ http://drupalcode.org/sandbox/grobot/1076486.git
Comment #172
xurizaemon1) Sun recommended twitter_account_save() should use a db_merge() query.
db_merge() doesn't (seem to) like a $values with array keys which don't exist in the DB table (while drupal_write_record() is agreeable to that sort of thing). I worked around this by pulling the schema and checking each entry, but it smells a bit to me.
twitter_account_save() is called both from the OAuth callback (with a full TwitterUser object) and from the form save (with only a couple of additional values). It felt like scanning the schema was better than a switch stmt to decide which values to use (checking against schema should provide a more general solution IMO).
2) Also had to add some checks for a few columns which come across from TwitterUser as booleans, but save as integers.
Would appreciate review/suggestions on this approach.
Comment #173
berdirIf you do that, then you can just as well use drupal_write_record() because one of the main reasons to avoid it is that drupal_get_schema() will load the complete schema cache.
Why don't you just put the keys you want in an array and then use http://ch.php.net/manual/en/function.array-intersect-assoc.php to throw everything else away?
Comment #174
xurizaemonI expect sun's suggestion to swap drupal_write_record() for db_merge() was to remove/wrap SELECTs which check if (1) account exists and (2) post exists (first and third code blocks at #153).
a) Current approach might have avoidable SELECT queries which db_merge() will remove (depending on the current DB driver?).
b) Storing the keys we want in an array feels wrong, seems like code duplication to me. We have two places where a new column needs addition etc.
c) Loading schema is bad performance, I agree. Maybe performance isn't a big issue in twitter_account_save(), but in twitter_status_save() it will be.
I suspect you're right, and that my objections to (b) are just theoretical.
Comment #175
berdirThere is no perfect solution right now. Yes, having an array of schema keys is code duplication, but you're code is basically duplicating drupal_write_record().
Note that db_merge() always executes two queries too.
Comment #176
xurizaemonI'm happy with (b) then and will go with that. Thanks Berdir. Yes, I had suspected that db_merge() would be doing two queries.
Comment #177
jonaskills commented+1
Comment #178
rorymadden commented+1
Comment #179
tedstein commented+1
Comment #180
FreeFox commented+1
Comment #181
kenheim commentedsubscribe
Comment #182
dlthomas commented+
Comment #183
hendrakieran commented+1
Comment #184
michaelj commentedHi, for users that need only login via twitter functionality (Drupal 7 - temporary solution). Don't need any other modules.
please read README.txt.
Comment #185
Jason Dean commented+1
Comment #186
juliakoelsch commentedsubscribe
Comment #187
rjbrown99 commentedWith PHP 5.3.6, and using the sandbox http://github.com/GiantRobot/drupal-twitter, I also had to change the twitter.lib.php file, specifically the protected function parse_response, on line 268.
Original:
Fixed (see the last json_decode statement in the ELSE):
... otherwise I got this: Warning: json_decode() expects at most 3 parameters, 4 given in Twitter->parse_response(). It also prevented it from registering with the Twitter website. That one line change made it work for me.
Comment #188
rjbrown99 commentedOne other note. With just Oauth enabled, the site works fine with no other issues. After enabling the Twitter module, I get intermittent and strange Ajax errors. This happens in the views UI (adding filters), running update.php (which fails), and checking for new updates (/admin/reports/updates/check).
For example here's what I get when checking for updates.
... or this...
I can keep disabling modules - boost/apc/whatever, and the last "placeholder" value above just changes to something else like Chaos tools. All is well once Twitter is disabled.
Comment #189
xurizaemon@rjbrown re #187, that issue is #985544: {twitter}.twitter_id incompletely stored (final digits are zeroes) due to json_decode limitation in PHP<5.3. I'd welcome your thoughts there. It may be that we need to reinstate the XML API approach (but there are a couple of reasons I'm unsure that's the best approach).
PHP docs are a little hazy on when json_decode scores the "options" parameter (specifically: a "Future" version). So maybe we need to shelve that until PHP has more solid support for the JSON API approach, or we can work around it more cleanly than my crude patch from that issue.
Thanks for the update in #188, will investigate (pretty busy of late, sorry all).
Comment #190
rjbrown99 commentedThanks. Not quite sure how to approach that one for #187. For now I rolled with the twitter_pull module since it's somewhat basic and still roughly does what I need.
One other note during my testing: I was logged in as admin/UID1. Roughly following the process in post #104, I went to user/3/edit/twitter (for a different user) and did an "add account". That process did work, but it actually added the twitter account to UID1/admin and not UID3 which was the intent.
Comment #191
modctek commentedSubscribing
Comment #192
xnegris commentedComment #193
mrfelton commentedsubscribing
Comment #194
xurizaemonFixed the issue where accounts were associated with the current (not edited) user at user/%user/edit/twitter. Thanks rjbrown99 for that.
I can't duplicate those AJAX errors though ... tried both views AJAXy-ness and updates.
Re-roll attached (grab 6.x-3.x from official Git + patch), or just pull 7.x-3.x from sandbox at http://drupal.org/sandbox/grobot/1076486
Comment #195
disparil commented+1
Comment #196
joeyabbs commentedsubscribing
Comment #197
Trunkhorn commentedsub
Comment #198
geerlingguy commentedSubscribe.
Comment #199
jonlambert commentedsubscribing
Comment #200
4v4l0n42 commentedSubscribing
Comment #201
deggertsen commentedSubscribing. I assume that the version in your standbox @grobot is ready for testing? I will be testing it soon...
Comment #202
jwilson3I just tried testing @grobot's sandbox, but had issues getting it to work because there is no master or default branch.
Please help me on: #1166678: git clone is empty if you know something I don't.
Comment #203
danny englanderExcuse me if I am missing something but why was a sandbox in #194 necessary? Couldn't a new dev branch for 7.x just be started for this existing module?
Comment #204
laevensv@gmail.com commentedSubscribing
Comment #205
jbucks commentedsubscribe
Comment #206
Taxoman commentedSubscribing
Comment #207
Shadlington commented#203: Because grobot doesn't have commit access to this project, unfortunately.
Comment #208
dan_metille commentedsubscribing
Comment #209
majortom commentedSubscribing.
Comment #210
modctek commentedAt what point is a module considered abandoned by the original maintainers? Have we heard anything, even a "I won't have time to port this to D7"? It would seem that development on this is somewhat hindered by their absence.
Comment #211
sd2k9 commentedIt seems that way ... what is the drupal way in this case to migrate
http://drupal.org/sandbox/grobot/1076486
to here as a dev D7 branch?
Comment #212
Shadlington commentedThe drupal way is here: http://drupal.org/node/251466
The basic gist is the person whom wishes to take over the module has to raise an issue requesting commit access on the module, wait two weeks and then if no response has been given, move the issue to the webmasters issue queue.
The d.o webmasters can then give that person commit access.
It should probably be possible to contact walkah via email if an issue is not responded to though. Failing that you could even try contacting eaton.
Comment #213
dandaman commentedI tweeted @walkah and @eaton asking them to take a look at this thread if they have a minute or two. Hopefully they'll see that at least most of their porting work and some of the testing work is done for them and either commit the new version or appoint a new manager for the project.
Comment #214
eaton commentedHey, everyone -- thanks for the hard work ironing out the initial wok on D7.
As dandaman suggests, Twitter module (especially the D7 branch) has just not been getting any love from either of the project's maintainers. I'm not using Twitter.module on any projects at the moment, and I haven't upgraded any of the major sites that would need it to D7 yet.
That means that while I like the module, it hasn't gotten as much attention since the switch to OAuth complicated the testing and troubleshooting process. If there are any interested parties who are willing to put time into testing and vetting these patches, I'd be happy to add commit rights to make them a maintainer.
Comment #215
fubhy commented+1
Comment #216
floown commented+1
Comment #217
dan_metille commentedHi everybody,
Thanks to all for this great job. I was unable to use the Twitter module 6.x since the last Twitter shift to oauth. And now I'm so glad to see it working on D7.
However, maybe I'm missing something, but I cannot find out how to get the 'Post to Twitter' option while editing some content. Is this feature still existing?
Comment #218
aristeides commentedtry navigating to admin/config/twitter/post to choose content types that will be auto-posted to twitter.
couldn't find an option for individual posts either.
Comment #219
aristeides commentedcorrection: after choosing your content type at the above url, the option appears on the content editing form.
the admin/config/twitter/post url is found if you read the twitter_post.module file....
Comment #220
dan_metille commented@aristeides thanks for the tip, now I find the setting page.
However, it seems to me that no tweet is published when creating some new content, even after running cron job.
Any idea what can be wrong?
Comment #221
aristeides commentedno idea... I've got the exact same issue, trying to figure it out.
Comment #222
dandaman commentedThe settings page path should probably be updated to "admin/config/services/twitter" and then it would show up correctly on the "Configuration" page, by the way.
Comment #223
craigritchie commented@eaton and others: is there a way to "hire" someone to complete this port? I see, for example, on this thread http://drupal.org/node/691078 that someone asked for payment so he could devote his time to completing the requirements. I'm somewhat ignorant to all of this -- is there some way/where to post a "job" for a new maintainer and those of us here could pitch in to fund the work?
Comment #224
Argus commentedWow, new business model for Drupal app development other then the infamous appstore...... Great idea!
Comment #225
megan_m commentedsubscribing
Comment #226
michaek commentedI believe the current maintainers don't have any current plans to port this to 7. I'm talking with them about becoming a maintainer, and I'd definitely be interested in getting a version ready for 7, but I'd have to pass the hat to be able to free up my time. I've seen good things happen on Kickstarter before, so I'd be open to opening a project there to see if we can get this thing going!
Comment #227
michaek commentedNow that I'm a maintainer on the project, I'll get a Drupal 7 branch started containing the commits from @grobot's github. First thing Monday. :)
Comment #228
eaton commentedAnyone who was interested in donating to the project is also welcome to paypal a "Thanks!" to michaelk if they feel like welcoming the new maintainer. ;-) Huge thanks for being willing to take on the project now that walkah and I have been unable to give it the attention it deserves!
Comment #229
pefferen commentedsubscribing
Comment #230
bradjones1Thanks michaek, and once you get a branch opened up Monday I'd be happy to check it out and hack around a bit, too.
Comment #231
anavarreSubscribe
Comment #232
cxttv commentedsubscribing
Comment #233
michaek commentedHi, folks. I've pushed the branch to Drupal's git. So far, it's no different from @grobot's github, but hopefully we'll get some more testing and issues in for this branch. Thanks for your patience!
Comment #234
geerlingguy commentedAwesome - do you want to close this issue yet, or leave it open a while longer? It's getting a little long... plus, since there's a 7.x branch, people can file specific issues against it...
Comment #235
michaek commentedThat works for me! Closing!
Comment #236
Anonymous (not verified) commentedIs oauth not available for D7? Then how do we get Twitter Signin to work?
Comment #237
voxpelli commented@morningtime: Seen http://drupal.org/node/1167740 ? OAuth is just like Twitter in the process of being ported and just like with Twitter you can post issues regarding that module in its issue queue.
Comment #238
JGO commentedReflectionException: Function rules_core_action_execute() does not exist in ReflectionFunction->__construct() (line 1382 of \sites\all\modules\rules\includes\rules.core.inc)
Suffering from this when enabling the twitter actions module :| please fix
Comment #239
luco commented@JGO now that there's an official release for the module, I think it's time we start to direct each issue to the queue.
sorry if I can't be of any real help, code-wise, but at least you'll have more chance to be heard by filing your bug in the right place :]
Comment #240
apop commentedsubscribing, appreciate the work
Comment #241
mrryanjohnston commentedSubscribing. Thank you so much for this module
Comment #242
flightrisk commentedThe comments say that OAuth is NOT necessary anymore for just displaying the twitter feed, is that true for the D7 version? How do I configure it to create a simple twitter block while I wait for OAuth and a full version of this? I see a "tweet block", but is has options that I'm not sure of like path and attribute tag, etc.
Comment #243
michaek commentedIt's not true for D7. The port was done before the recent work on 6.x.
It's really better to create new issues than to add comments to this closed issue. Thanks!
Comment #244
zeezack commentedI get an error activating oAuth provider ui - it could be this module that is failing to allow posting to twitter.
Comment #245
michaek commentedThis issue is closed, and should not be used to initiate new bug reports or support requests.
Comment #246
xanenightwing commentedsubscribing...