Hi there,

What's the planned path for taking this module to Drupal 7; is there any work towards this yet?

I can help contribute, but don't want to repeat work that's already been done or that is already planned.

G.

Comments

BenK’s picture

Subscribing...

yngens’s picture

subscribe

johngriffin’s picture

subscribe

tsvenson’s picture

Subscribing, I am especially interested in the OAuth integration.

electroponix’s picture

very interested also

Khalor’s picture

+1

XerraX’s picture

+1

Cheek’s picture

sub

janis_lv’s picture

sup?

webchick’s picture

Status:Active» Needs work
StatusFileSize
new73.91 KB

Here'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.

Aren Cambre’s picture

subscribe

beeradb’s picture

I 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.

ZoeN’s picture

+1

codingdesigner’s picture

subscribe

mikl’s picture

This is onle of those issues that could use a Git repo, especially if the maintainers are too busy to work on this themselves…

encho’s picture

subscribing

danvy’s picture

Any chance to get Drupal 7 support now that beta 1 is out ?

bstanfield’s picture

subscribe

davebv’s picture

+1

Andy B’s picture

subscribe +1.

Does anybody have any other ideas that will work until twitter and oauth come out for d7?

McGo’s picture

As 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

Support for OAuth 6.x-3.x will be released prior to a Twitter 6.x-3.x final relase.

So Twitter 3.x is already OAuth 3.x ready?

Andy B’s picture

I think oauth 3.0 compatibility should be in a new issue. This is D7 issue.

nightowl77’s picture

subscribe

flokli’s picture

subscribe

kika’s picture

subscribe

nwe_44’s picture

subscribing

jennifermontes’s picture

Subscribe

podarok’s picture

subscribe

mlncn’s picture

And 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?

voxpelli’s picture

I'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.

Danny Englander’s picture

Subscribing

danbohea’s picture

Subscribing...

randomnets’s picture

Subscribing...

bjmac’s picture

Subscribing

timhomewood’s picture

Subscribe

Eebs’s picture

Subscribing

c-c-m’s picture

Subscribing

mcduarte2000’s picture

Subscribing... I really wanted this module...

monjohn’s picture

Subscribing. It would be great if there were at least a branch created.

davemurphy’s picture

subscribing

geekgirlweb’s picture

+1 Subscribing

discursives’s picture

+1 subscribe

BiosElement’s picture

+1 subscribe

jucallme’s picture

following this one

cpettifer’s picture

subscribing

juliusvaart’s picture

Subscribing

Bart Vanhoutte’s picture

Subscribing

exlin’s picture

+1

luco’s picture

+1

sw3b’s picture

Subscribing

lammertsm’s picture

subscribing

jlporter’s picture

sub

nakedeyez’s picture

Subscribing

CSCharabaruk’s picture

subscribing

andypost’s picture

+1, anyone tried patch from #10 ?

Niklas Fiekas’s picture

Subscribe.

redhatmatt’s picture

++1

dapen’s picture

subscribe

luco’s picture

@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

jonesrussell42’s picture

subscribe

Rj-dupe-1’s picture

Subscribe

Sylvain Lasnier’s picture

Subscribe

hbk’s picture

following this one

jlporter’s picture

can the maintainer create a d7 branch, kind of silly that there are only random patches sitting around.

voxpelli’s picture

@jlporter: There's no D7-version of the module so a branch would make no sense?

xurizaemon’s picture

@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.

xurizaemon’s picture

StatusFileSize
new85.39 KB

Here'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.

ogi’s picture

subscribe

luco’s picture

@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

xurizaemon’s picture

@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.

luco’s picture

@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?

luco’s picture

@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:

Fatal error: Call to undefined function db_fetch_array() in /home/ (...) /sites/all/modules/oauth/includes/DrupalOAuthConsumer.inc on line 209

any ideas?

luco’s picture

oops. disabled OAuth Provider UI and now I can add twitter accounts... NOT.

tried to add without password and got this message:

Notice: Undefined index: twitter_account in twitter_account_form_submit() (line 358 of /home/ (...) /sites/all/modules/twitter/twitter.pages.inc).

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.

xurizaemon’s picture

StatusFileSize
new88.78 KB

Update. 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.)

xurizaemon’s picture

If 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.

Peter Törnstrand’s picture

Subscribe.

boonep’s picture

subscribe

Tebb’s picture

Subscribing.

luco’s picture

@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

xurizaemon’s picture

@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 :)

Jason Brain’s picture

subscribe.

likewhoa’s picture

Title:Drupal 7 port of Twitter module» Port to Drupal 7
Category:feature» task
Priority:Normal» Major
Issue tags:-drupal7+D7 porting, +port to d7
StatusFileSize
new89.96 KB

while patching twitter-6.x-dev with #74

patching file twitter.inc
patching file twitter.info
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file twitter.info.rej
patching file twitter.install
patching file twitter.lib.php
patching file twitter.module
patching file twitter.pages.inc
patching file twitter.views.inc
patching file twitter.views_default.inc
patching file twitter_actions/twitter_actions.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file twitter_actions/twitter_actions.info.rej
patching file twitter_actions/twitter_actions.module
patching file twitter_actions/twitter_actions.rules.inc
patching file twitter_post/twitter_post.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file twitter_post/twitter_post.info.rej
patching file twitter_post/twitter_post.module
patching file twitter_post/twitter_post.pages.inc
patching file twitter_signin/twitter_signin.info
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file twitter_signin/twitter_signin.info.rej
patching file twitter_signin/twitter_signin.module
patching file twitter_signin/twitter_signin.pages.inc
patching file twitter_views_field_handlers.inc

Attached is a revised patch to fix the rejects. Apply this from your modules root folder.

xurizaemon’s picture

The 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.

JamesSharpe’s picture

Subscribing

robxu9’s picture

subscribing.

davidbarratt’s picture

subscribe... shouldn't there be a way to subscribe a thread without having to post a comment?

beeradb’s picture

@davidbarrett see http://3281d.com/projects/improving-subscriptions for how you can help with this.

luco’s picture

it 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.

jlporter’s picture

Title:Port to Drupal 7» Port twitter to Drupal 7

Can the maintainer at least open a 7.x branch. Would be nice to not have to continuously patch against 6.x

Danny Englander’s picture

Can the maintainer at least open a 7.x branch. Would be nice to not have to continuously patch against 6.x

I 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.

jlporter’s picture

regardless 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.

Danny Englander’s picture

@jlporter - ah I see what you are saying, makes sense. :)

Aren Cambre’s picture

Has anyone asked walkah to be a co-maintainer? I sense there's enough talent here for at least one or more co-maintainers.

likewhoa’s picture

@jlporter the patch i added in #82 can be applied from d7 on d6 copy of twitter.

xurizaemon’s picture

StatusFileSize
new89.78 KB

This 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 :)

luco’s picture

@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.

wickedskaman’s picture

subscribing... yup.

cpettifer’s picture

Anyone 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?

l33tdawg’s picture

Grobot - damn good work mate

luco’s picture

is 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 :)

likewhoa’s picture

@cpettifer we shouldn't have to rely on a third party website for authentication, instead we should fix what's wrong with oauth

Aren Cambre’s picture

Status:Needs work» Needs review

Can 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.

xurizaemon’s picture

Status:Needs review» Needs work

Sorry 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?)

xurizaemon’s picture

Luco, 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.

xurizaemon’s picture

StatusFileSize
new90.25 KB

Updated 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.)

bdhond’s picture

subscribing

luco’s picture

@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/

luco’s picture

@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:

    * Notice: Undefined variable: response in TwitterOAuth->get_request_token() (line 312 of /home/luco/public_html/d7/sites/all/modules/twitter/twitter.lib.php).
    * Notice: Undefined index: oauth_token in TwitterOAuth->get_request_token() (line 313 of /home/luco/public_html/d7/sites/all/modules/twitter/twitter.lib.php).
    * Notice: Undefined index: oauth_token_secret in TwitterOAuth->get_request_token() (line 313 of /home/luco/public_html/d7/sites/all/modules/twitter/twitter.lib.php).
    * Notice: Undefined index: oauth_token in TwitterOAuth->get_authorize_url() (line 319 of /home/luco/public_html/d7/sites/all/modules/twitter/twitter.lib.php).

any ideas?
anyway thanks for the help so far :]]

goldlilys’s picture

Subscribing

luco’s picture

@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...

Berdir’s picture

Just going through the patch, a few hints...

+++ twitter.inc
@@ -38,7 +38,7 @@ function twitter_account_save($twitter_user, $save_auth = FALSE, $account = NULL
-  if (db_result(db_query("SELECT 1 FROM {twitter_account} WHERE twitter_uid = %d", $values['id']))) {
+  if (db_query("SELECT 1 FROM {twitter_account} WHERE twitter_uid = :twitter_uid", array(':twitter_uid' => $values['id']))->fetchField()) {

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.

+++ twitter.inc
@@ -46,17 +46,28 @@ function twitter_account_save($twitter_user, $save_auth = FALSE, $account = NULL
+ * @param $id
+ *   Twitter UID
+ *
+ * @return ¶
+ *   TwitterUser object

Trailing whitespace here.

+++ twitter.inc
@@ -46,17 +46,28 @@ function twitter_account_save($twitter_user, $save_auth = FALSE, $account = NULL
-  $values = db_fetch_array(db_query("SELECT * FROM {twitter_account} WHERE twitter_uid = %d", $id));
+  $result = db_query("SELECT * FROM {twitter_account} WHERE twitter_uid = :twitter_uid", array(':twitter_uid' => $id))->fetch();
+  $values = (array)$result;

You can do this directly with fetchAssoc(). $values = db_query('...')->fetchAssoc():

+++ twitter.inc
@@ -110,16 +121,31 @@ function twitter_fetch_user_timeline($id) {
+  // TODO Please review the conversion of this statement to the D7 database API syntax.
+  /* db_query("UPDATE {twitter_account} SET last_refresh = %d WHERE twitter_uid=%d", REQUEST_TIME, $account->id) */
+  db_update('twitter_account')
+  ->fields(array(
+    'last_refresh' => REQUEST_TIME,
+  ))
+  ->condition('twitter_uid', $account->id)
+  ->execute();

Looks fine technically. Only a coding style issue, you should indent changed method calls by two spaces.

+++ twitter.inc
@@ -110,16 +121,31 @@ function twitter_fetch_user_timeline($id) {
-  $sql = "DELETE FROM {twitter_account} WHERE twitter_uid = %d";
-  $args = array($twitter_uid);
+  $sql = "DELETE FROM {twitter_account} WHERE twitter_uid = :twitter_uid";
+  $args = array(':twitter_uid' => $twitter_uid);
   if (!empty($screen_name)) {
-    $sql .= " AND screen_name = '%s'";
-    $args[] = $screen_name;
+    $sql .= " AND screen_name = :screen_name";
+    $args[':screen_name'] = $screen_name;
   }
   db_query($sql, $args);
}

Needs to be converted to db_delete().
Untested:

<?php
$query
= db_delete('twitter_account')
  ->
condition('twitter_uid', $twitter_uid);
if (!empty(
$screen_name)) {
 
$query->condition('screen_name', $screen_name);
}
$query->execute();
?>

Dynamic stuff like this is where the new database layer is really awesome :)

+++ twitter.info
@@ -2,4 +2,13 @@
+files[] = twitter.inc
+files[] = twitter.install
+files[] = twitter.lib.php
+files[] = twitter.module
+files[] = twitter.pages.inc
+files[] = twitter.views.inc
+files[] = twitter.views_default.inc
+files[] = twitter_views_field_handlers.inc
+configure = admin/config/services/twitter

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.

+++ twitter.install
@@ -283,14 +290,22 @@ function twitter_schema() {
+  // TODO Please review the conversion of this statement to the D7 database API syntax.
+  /* db_query("UPDATE {system} SET weight = 3 WHERE name = 'twitter'") */
+  db_update('system')
+    ->fields(array(
+        'weight' => 3,
+      ))
+    ->condition('name', 'twitter')
+    ->execute();

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.

+++ twitter.install
@@ -283,14 +290,22 @@ function twitter_schema() {
@@ -317,7 +332,7 @@ function twitter_update_6001() {

@@ -317,7 +332,7 @@ function twitter_update_6001() {

   $attributes = array(
     'description' => t("The location of the {twitter_account}'s owner."),
-    'length' => 255
+    'length' => 255,
   );
   db_add_column($ret, 'twitter_account', 'location', 'varchar(255)', $attributes);

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.

+++ twitter.install
@@ -487,209 +528,221 @@ function twitter_update_6006() {
/**
- * Update from 2.x to 3.x
+ * Update from 2.x to 3.x
  */
function twitter_update_6300() {
   $ret = array();

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.

+++ twitter.install
@@ -487,209 +528,221 @@ function twitter_update_6006() {
+      // TODO Please review the conversion of this statement to the D7 database API syntax.
+      /* db_query("UPDATE {twitter_account} SET uid=%d, password='%s', import=%d WHERE screen_name='%s'", $row['uid'], $row['password'], $row['import'], $row['screen_name']) */
+      db_update('twitter_account')
+        ->fields(array(
+            'uid' => $row['uid'],
+            'password' => $row['password'],
+            'import' => $row['import'],
+          ))
+        ->condition('screen_name', $row['screen_name'])
+        ->execute();

OK :)

+++ twitter.module
@@ -15,19 +15,20 @@ function twitter_menu() {
+    'type' => MENU_NORMAL_ITEM,

NORMAL_ITEM is the default, so you don't really need to specify it. Doesn't hurt...

+++ twitter.module
@@ -117,74 +135,57 @@ function twitter_cron() {
+    // TODO Please review the conversion of this statement to the D7 database API syntax.
+    /* db_query('DELETE FROM {twitter} WHERE created_time < %d', REQUEST_TIME - $age) */
+    db_delete('twitter')
+      ->condition('created_time', REQUEST_TIME - $age, '<')
+      ->execute();

Looks good.

+++ twitter.module
@@ -220,32 +221,36 @@ function twitter_get_user_accounts($uid) {
-  $sql = "SELECT twitter_uid FROM {twitter_account} WHERE uid = %d";
+
+  $sql = "SELECT twitter_uid FROM {twitter_account} WHERE uid = :uid";
   if (user_access('use global twitter account')) {
-    $sql.= " OR is_global=1";
+    $sql .= " OR is_global=1";
   }
-  $results = db_query($sql, $account->uid);
+  $result = db_query($sql, array(':uid' => $account->uid));

Dynamic stuff like this should be converted to use db_select().

Untested:

<?php
$or
= db_or()->condition('uid', $account->uid);
if (if (
user_access('use global twitter account')) {
 
$or->condition('is_global', 1);
}

$result = db_select('twitter_account')
  ->
fields('twitter_account', array('twitter_uid'))
  ->
condition($or)
  ->
execute();
?>
+++ twitter.pages.inc
@@ -110,33 +118,28 @@ function _twitter_account_list_row($account) {
-    '#value' => theme('image', $account->profile_image_url, '', '', array(), FALSE),
+    '#markup' => theme('image', array('path' => $account->profile_image_url, 'width' => '', 'height' => '', 'alt' => array(), 'title' => FALSE)),

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)

+++ twitter.pages.inc
@@ -110,33 +118,28 @@ function _twitter_account_list_row($account) {
-  if (user_access('import own tweets')){ // Here we use user_access('import own tweets') to check permission instead of user_access('import own tweets', $account->uid) is because we allow roles with sufficient permission to overwrite the user's import settings.
+  if (user_access('import own tweets')) { // Here we use user_access('import own tweets') to check permission instead of user_access('import own tweets', $account->uid) is because we allow roles with sufficient permission to overwrite the user's import settings.

Since you touch that line anyway, you could move that comment on separate lines before the if and break it at 80 chars.

+++ twitter.pages.inc
@@ -230,16 +248,31 @@ function twitter_user_make_global($form_state, $account, $twitter_uid) {
+  // TODO Please review the conversion of this statement to the D7 database API syntax.
+  /* db_query("UPDATE {twitter_account} SET is_global = (1 - is_global) WHERE twitter_uid = %d", $form_state['values']['twitter_uid']) */
+  db_update('twitter_account')
+  ->fields(array(
+    'is_global' =>  (1 - is_global),
+  ))
+  ->condition('twitter_uid', $form_state['values']['twitter_uid'])
+  ->execute();

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/...

+++ twitter.views.inc
@@ -13,7 +13,7 @@
/**
- * Implementation of hook_views_handlers()
+ * Implements hook_views_handlers().
  */
function twitter_views_handlers() {
   return array(

You can remove this hook, views now finds it's handlers through the files[] definition in the .info file.

+++ twitter_actions/twitter_actions.info
@@ -1,6 +1,9 @@
+files[] = twitter_actions.module
+files[] = twitter_actions.rules.inc

Same here, this shouldn't be necessary.

+++ twitter_post/twitter_post.info
@@ -1,6 +1,8 @@
+files[] = twitter_post.module
+files[] = twitter_post.pages.inc

Same here :)

+++ twitter_post/twitter_post.module
@@ -7,29 +7,28 @@
-  $items['admin/settings/twitter/post'] = array(
+  $items['admin/config/twitter/post'] = array(

Looks like this hasn't been update to the services URL

+++ twitter_signin/twitter_signin.info
@@ -2,6 +2,9 @@
+files[] = twitter_signin.module
+files[] = twitter_signin.pages.inc

Once again, not necessary :)

+++ twitter_signin/twitter_signin.module
@@ -11,60 +11,70 @@ function twitter_signin_menu() {
-  $items['admin/settings/twitter/signin'] = array(
+  $items['admin/config/twitter/signin'] = array(

Same here, looks like you want to update this.

+++ twitter_signin/twitter_signin.module
@@ -11,60 +11,70 @@ function twitter_signin_menu() {
-  return l(theme('image', $img, t('Sign in with Twitter')), 'twitter/redirect', array('html' => TRUE));
+
+  return l(theme('image', array('path' => $img, 'width' => t('Sign in with Twitter'))), 'twitter/redirect', array('html' => TRUE));

The second argument is alt, not width :)

+++ twitter_views_field_handlers.inc
@@ -60,7 +64,7 @@ class twitter_views_handler_field_xss extends views_handler_field {
-    return theme('image', $value, '', '', array(), FALSE);
+    return theme('image', array('path' => $value, 'width' => '', 'height' => '', 'alt' => array(), 'title' => FALSE));

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.

jlporter’s picture

Is 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.

xurizaemon’s picture

I 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

shinz83’s picture

subscribe

dre2phresh’s picture

Subscribing

BenK’s picture

For 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

Seldon’s picture

subscribe

xurizaemon’s picture

StatusFileSize
new84.89 KB

Thanks DaveReid for grabbing most of the fixes suggested by Berdir in #111, as well as a few other things added in this patch.

georgedamonkey’s picture

subscribe

opi’s picture

subscribing too

aristeides’s picture

subscribing

Shadlington’s picture

Subscribing

john.oltman’s picture

subscribe

alayham’s picture

sub

alayham’s picture

installed 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

ReflectionException: Function rules_core_action_execute() does not exist in ReflectionFunction->__construct() (line 1387 of .../sites/all/modules/rules/includes/rules.core.inc).

after some research, it looks like twitter should upgrade the rules integration features...

Ilya1st’s picture

subscribing

dcmistry’s picture

Subscribe

calvintennant’s picture

subscribing.

OFF’s picture

Subscribe

radj’s picture

+1

bronzehedwick’s picture

Subscribe

chriz001’s picture

subscribe

craigritchie’s picture

subscribe

BartK’s picture

subscribe

Shaque’s picture

subbing

Marc Bijl’s picture

Subscribe

gbrands’s picture

Subscribing

bensnyder’s picture

subscribe

dandaman’s picture

How 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.

xurizaemon’s picture

StatusFileSize
new83.79 KB

Quick 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.

dandaman’s picture

Nice! 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.

Argus’s picture

+1

nimzie’s picture

subscribe

kenheim’s picture

subscribe

Stephen Rockwell’s picture

subscribing

gbrands’s picture

If 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:

<?php
$response
= drupal_http_request($url, array('headers' => $headers, 'method' => $method, 'data' => $data));
?>

This is around line 240 or so in twitter.lib.php

I will see what I can do about a patch later.

lelandnielsen’s picture

Subscribing

monican’s picture

subscribing

math-hew’s picture

subscribe

pbz1912’s picture

subscribe

sun’s picture

+++ b/twitter.inc
@@ -37,7 +37,7 @@ function twitter_account_save($twitter_user, $save_auth = FALSE, $account = NULL
-  if (db_result(db_query("SELECT 1 FROM {twitter_account} WHERE twitter_uid = %d", $values['id']))) {
+  if (db_query("SELECT 1 FROM {twitter_account} WHERE twitter_uid = :twitter_uid", array(':twitter_uid' => $values['id']))->fetchField()) {
     drupal_write_record('twitter_account', $values, array('twitter_uid'));
   }
   else {

Should be converted into a db_merge() query.

+++ b/twitter.inc
@@ -45,17 +45,27 @@ function twitter_account_save($twitter_user, $save_auth = FALSE, $account = NULL
+ * @todo How well does this handle the Twitter UID not being in the
+ *       DB?
...
function twitter_account_load($id) {

Unclear what this @todo talks about. Either clarify or remove.

+++ b/twitter.inc
@@ -66,14 +76,14 @@ function twitter_status_save($status) {
-  if (db_result(db_query("SELECT 1 FROM {twitter} WHERE twitter_id = %d", $status->id))) {
+
+  if (db_query("SELECT 1 FROM {twitter} WHERE twitter_id = :twitter_id", array(':twitter_id' => $status->id))->fetchField()) {
     drupal_write_record('twitter', $status, array('twitter_id'));
   }
   else {
     drupal_write_record('twitter', $status);
   }

db_merge() here, too.

+++ b/twitter.lib.php
@@ -257,7 +257,15 @@ class Twitter {
+        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+          // in_reply_to_id ?
+          // ALL integers?
+          $response = preg_replace('/"id":([0-9]*)/', '"id":"\1"', $response);

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?

+++ b/twitter.lib.php
@@ -493,7 +501,9 @@ class TwitterUser {
   public function set_auth($values) {
...
+    if ( isset($values['password']) ) {

Coding standards.

+++ b/twitter.module
@@ -1,11 +1,9 @@
+ * Implements hook_meu().

Typo.

+++ b/twitter.module
@@ -14,72 +12,69 @@ function twitter_menu() {
+    'use global twitter account' => array(
+      'title' => t('Use global Twitter account'),
+      'description' => t('Use the site global Twitter account.'),
+    ),

Description should be the title and description can be removed afterwards.

+++ b/twitter.module
@@ -116,74 +111,54 @@ function twitter_cron() {
+  $filters['twitter_username'] = array(
+    'title' => t('Twitter @username converter'),
...
+    'process callback' => 'twitter_link_filter',
...
+  $filters['twitter_hashtag'] = array(
+    'title' => t('Twitter #hashtag converter'),
...
+    'process callback' => 'twitter_link_filter',
...
function twitter_link_filter($text, $prefix = '@', $destination = 'http://twitter.com/') {

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_*()

+++ b/twitter.module
@@ -219,33 +192,40 @@ function twitter_get_user_accounts($uid) {
+  $query = db_select('twitter_account', 'ta');
+  $query->addField('ta', 'twitter_uid');
+  $query->condition('ta.uid', $account->uid);
   if (user_access('use global twitter account')) {
-    $sql.= " OR is_global=1";
+    $or = db_or();
+    $or->condition('ta.uid', $account->uid);
+    $or->condition('ta.is_global', 1);
+    $query->condition($or);
+  }
+  else {
+    $query->condition('ta.uid', $account->uid);
   }

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.

+++ b/twitter.module
@@ -219,33 +192,40 @@ function twitter_get_user_accounts($uid) {
+  $twitter_uids = $query->execute()->fetchCol();
+  foreach ($twitter_uids as $twitter_uid) {

The variable assignment is needless; move the $query->execute()->fetchCol() directly into the foreach control construct.

+++ b/twitter.pages.inc
@@ -1,78 +1,72 @@
+  $form['twitter_expire'] = array(
+    '#type' => 'select',
...
+    '#options' => array(0 => t('Never')) + drupal_map_assoc(array(604800, 2592000, 7776000, 31536000), 'format_interval'),

Should use

  '#empty_option' => t('- Never -'),

instead.

+++ b/twitter.pages.inc
@@ -328,19 +358,35 @@ function twitter_account_oauth_validate($form, &$form_state) {
+/**
+ * @TODO This code should probably be reviewed.
+ *
+ * Wrapper to calll drupal_form_submit() which wasn't required in D6.
+ */
+function twitter_oauth_callback() {
+  $form_state['values']['oauth_token'] = $_GET['oauth_token'];
+  drupal_form_submit('twitter_oauth_callback_form', $form_state);
+}

-function twitter_oauth_callback(&$form_state) {
+/**
+ * Form builder function. In D6 this form was built in response to the
+ * oauth return request from Twitter, and the setting of
+ * $form['#post'] seems to have caused the form to be validated and
+ * processed.
+ */
+function twitter_oauth_callback_form($form, &$form_state) {
   $form['#post']['oauth_token'] = $_GET['oauth_token'];
-
   $form['oauth_token'] = array(
     '#type' => 'hidden',
     '#default_value' => $_GET['oauth_token'],
   );
-
   return $form;
}

I don't know the details here, but this sounds like simply setting

$form['#method'] = 'GET';

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.

+++ b/twitter.pages.inc
@@ -374,6 +431,14 @@ function twitter_oauth_callback_submit(&$form, &$form_state) {
+  global $user ;
+  if ( $user->uid ) {

Coding standards.

+++ b/twitter.pages.inc
@@ -374,6 +431,14 @@ function twitter_oauth_callback_submit(&$form, &$form_state) {
+  // redirect isn't firing - because we're using drupal_submit_form()?
+  // - so adding drupal_goto() here (but not liking it).
+  drupal_goto('user/' . $user->uid . '/edit/twitter');

Using #method GET should also make this drupal_goto() obsolete.

+++ b/twitter_signin/twitter_signin.module
@@ -60,12 +58,10 @@ function twitter_signin_user($op, &$edit, &$account, $category = NULL) {
function twitter_signin_button() {
...
+  $img = drupal_get_path('module', 'twitter_signin') . '/images/' . variable_get('twitter_signin_button', 'Sign-in-with-Twitter-lighter-small.png');
...
+  return l(theme('image', array('path' => $img, 'alt' => t('Sign in with Twitter'))), 'twitter/redirect', array('html' => TRUE));

Separate issue: This should be a theme function, and all the variables should be prepared in a theme preprocess function.

+++ b/twitter_signin/twitter_signin.pages.inc
@@ -21,10 +25,10 @@ function twitter_signin_admin_settings() {
     '#title' => t('Automatically register new users'),
     '#type' => 'radios',
-    '#options' => array(0 => t('No'), 1 => t('Yes')),
+    '#options' => array(t('No'), t('Yes')),

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.

craigritchie’s picture

Commit!!!! :)

titaniumbones’s picture

subscribing

monican’s picture

Sub

mikejonesok’s picture

+1

mattbk’s picture

Superscribing.

dwhutton’s picture

subscribe

Gergely Varga’s picture

Subscribing

patlo’s picture

subscribe

jjma’s picture

subscribe

alienseer23’s picture

+1

Audiolith’s picture

+1

agerson’s picture

Subscribing

erdembey’s picture

subscribe

yugongtian’s picture

+1

Fidelix’s picture

Subscribing...

7wonders’s picture

+1

jaialin’s picture

bump!

xurizaemon’s picture

Haven'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

xurizaemon’s picture

1) 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.

<?php
/**
 * Saves a TwitterUser object to {twitter_account}
 */
function twitter_account_save($twitter_user, $save_auth = FALSE, $account = NULL) {
 
$values = (array) $twitter_user;
 
$values['twitter_uid'] = $values['id'];

 
// these values are boolean, but DB wants integers
 
foreach (array('protected', 'verified', 'profile_background_tile') as $k) {
    if (isset(
$values[$k])) {
     
$values[$k] = (int) $values[$k];
    }
  }

  if (
$save_auth) {
   
$values += $twitter_user->get_auth();
    if (empty(
$account)) {
      global
$user;
     
$account = $user;
    }
   
$values['uid'] = $account->uid;
  }

 
// avoid upsetting db_merge() by passing array keys which don't exist in the db
 
$schema = drupal_get_schema('twitter_account');
  foreach (
$values as $k => $v) {
    if (!isset(
$schema['fields'][$k])) {
      unset(
$values[$k]);
    }
  }

 
db_merge('twitter_account')
    ->
key(array('twitter_uid' => $values['twitter_uid']))
    ->
fields($values)
    ->
execute();
}
?>
Berdir’s picture

If 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?

<?php
$values
= array_intersect_assoc($values, $array_with_allowed_keys);
?>
xurizaemon’s picture

I 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.

Berdir’s picture

There 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.

xurizaemon’s picture

I'm happy with (b) then and will go with that. Thanks Berdir. Yes, I had suspected that db_merge() would be doing two queries.

jonaskills’s picture

+1

rorymadden’s picture

+1

tedstein’s picture

+1

FreeFox’s picture

+1

kenheim’s picture

subscribe

dlthomas’s picture

+

hendrakieran’s picture

+1

michaelj’s picture

StatusFileSize
new36.96 KB

Hi, for users that need only login via twitter functionality (Drupal 7 - temporary solution). Don't need any other modules.
please read README.txt.

Jason Dean’s picture

+1

Spry_Julia’s picture

subscribe

rjbrown99’s picture

With 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:

    switch ($format) {
      case 'json':
        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
          // in_reply_to_id ?
          // ALL integers?
          $response = preg_replace('/"id":([0-9]*)/', '"id":"\1"', $response);
          return json_decode($response, TRUE);
        }
        else {
          return json_decode($response, TRUE, 512, JSON_BIGINT_AS_STRING);
        }
    }
  }

Fixed (see the last json_decode statement in the ELSE):

    switch ($format) {
      case 'json':
        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
          // in_reply_to_id ?
          // ALL integers?
          $response = preg_replace('/"id":([0-9]*)/', '"id":"\1"', $response);
          return json_decode($response, TRUE);
        }
        else {
          return json_decode($response, TRUE, 512);
        }
    }
  }

... 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.

rjbrown99’s picture

One 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.

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /batch?id=29&op=do StatusText: OK ResponseText: :{"status":true,"percentage":"17","message":"Trying to check available update data ...\u003cbr \/\u003eChecked available update data for \u003cem class="placeholder"\u003eBoost\u003c\/em\u003e."}

... or this...

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /batch?id=31&op=do StatusText: OK ResponseText: :{"status":true,"percentage":"16","message":"Trying to check available update data ...\u003cbr \/\u003eChecked available update data for \u003cem class="placeholder"\u003eAlternative PHP Cache\u003c\/em\u003e."}

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.

xurizaemon’s picture

@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).

rjbrown99’s picture

Thanks. 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.

modctek’s picture

Subscribing

xnegris’s picture

mrfelton’s picture

subscribing

xurizaemon’s picture

StatusFileSize
new87.66 KB

Fixed 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

disparil’s picture

+1

joeyabbs’s picture

subscribing

Trunkhorn’s picture

sub

geerlingguy’s picture

Subscribe.

jonlambert’s picture

subscribing

4v4l0n42’s picture

Subscribing

deggertsen’s picture

Subscribing. I assume that the version in your standbox @grobot is ready for testing? I will be testing it soon...

jwilson3’s picture

I 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.

Danny Englander’s picture

Excuse 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?

laevensv@gmail.com’s picture

Subscribing

jbucks’s picture

subscribe

Taxoman’s picture

Subscribing

Shadlington’s picture

#203: Because grobot doesn't have commit access to this project, unfortunately.

sahaj’s picture

subscribing

majortom’s picture

Subscribing.

modctek’s picture

At 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.

sd2k9’s picture

It 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?

Shadlington’s picture

The 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.

dandaman’s picture

I 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.

eaton’s picture

Hey, 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.

fubhy’s picture

+1

floown’s picture

+1

sahaj’s picture

Hi 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?

aristeides’s picture

try 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.

aristeides’s picture

correction: 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....

sahaj’s picture

@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?

aristeides’s picture

no idea... I've got the exact same issue, trying to figure it out.

dandaman’s picture

The 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.

craigritchie’s picture

@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?

Argus’s picture

Wow, new business model for Drupal app development other then the infamous appstore...... Great idea!

mmcdermott’s picture

subscribing

michaek’s picture

I 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!

michaek’s picture

Now 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. :)

eaton’s picture

Anyone 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!

pefferen’s picture

subscribing

bradjones1’s picture

Thanks michaek, and once you get a branch opened up Monday I'd be happy to check it out and hack around a bit, too.

anavarre’s picture

Subscribe

cxttv’s picture

subscribing

michaek’s picture

Version:6.x-3.x-dev» 7.x-3.x-dev

Hi, 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!

geerlingguy’s picture

Awesome - 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...

michaek’s picture

Status:Needs work» Closed (fixed)

That works for me! Closing!

morningtime’s picture

Is oauth not available for D7? Then how do we get Twitter Signin to work?

voxpelli’s picture

@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.

JGO’s picture

ReflectionException: 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

luco’s picture

@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 :]

apop’s picture

subscribing, appreciate the work

mrryanjohnston’s picture

Subscribing. Thank you so much for this module

flightrisk’s picture

The 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.

michaek’s picture

It'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!

zeezack’s picture

I get an error activating oAuth provider ui - it could be this module that is failing to allow posting to twitter.

michaek’s picture

This issue is closed, and should not be used to initiate new bug reports or support requests.

xanenightwing’s picture

subscribing...