Description :–
Project URL https://drupal.org/sandbox/it.ravindrasingh/1970736
Tweet Poster module (D7) posts the status message with or without image from drupal website to twitter.com website by using Twitter API and Tweet Pic key. I had checked with the many other twitter related modules in drupal.org but did not find any module which provide posting image along with the status message.

This is a small module for D7 where we can extend it with any other custom form submit and node form submit. Module authorizes the twitter app dynamically once they post the status to twitter and shows the tweets on user’s twitter page.

Why I used Tweetpic API :-
Tweetpic.com itself uses the twitter web services and provides the storage for images. In this module all the images are stored in tweetpic.com .These images are used in status post is User has attached any Image.

Dependency Module : library
Required Library : Libraries has been added.
twitteroauth get it from https://github.com/abraham/twitteroauth/archive/master.zip
tmhOAuth (0.7.2) get it from https://github.com/themattharris/tmhOAuth/tree/6c4a2ae0650c7855c0e242fdf...

Configuration:-
1. Create a twitter app for your Website or project (https://dev.twitter.com/)
2. Download the module.
3. Enable it and go to admin > Twitter API Credential Settings
-Put Twitter App Consumer Key
-Twitter App Consumer Secret
-Callback URL (http://yourwebsite.com/twittercallback)
-TweetPic API (Get it from http://dev.twitpic.com/)
(Note: Please set the Access Level Read & Write while creating API keys on https://dev.twitter.com/ )
4. Save the configuration
5. For posting to twitter using Modules custom form go to Admin -> Structure -> Blocks -> Configure (Tweet Poster) block.

How it Works :-
In this module I have created a custom form (which will be shown in block) for sending the data to twitter. While sending the data ,first it checks whether the the twitter access token is available or not. If the access token is not available then it redirects to the twitter website and ask for the login to twitter account for that application to generate Access Token and Access token secret .Callback url redirects to your website with the response. If the callback respond is valid then it posts the content to twitter or else will show the response error.

Demonstration link for this project

http://w3web.in/drupaltest/
Username : tester
Password : tester

GIT repository link
git clone http://git.drupal.org/sandbox/it.ravindrasingh/1970736.git tweet_poster

Reviews of other projects:

CommentFileSizeAuthor
tweet_poster_screen_shot.JPG5.95 KBRavindraSingh

Comments

ram4nd’s picture

Title: [D7] Tweet Poster » [D8] Tweet Poster
RavindraSingh’s picture

Title: [D8] Tweet Poster » [D7] Tweet Poster
Status: Needs review » Needs work

basically this module is developed for D7.

zestagio’s picture

Title: [D8] Tweet Poster » [D7] Tweet Poster

Hi, i'm reviewed your project, in the file tweet_poster.module:

  1. On line 42 replace 'access callback' => TRUE, because I am as an anonymous user access to adjustments. http://w3web.in/drupaltest/admin/config/services/tweet_poster
  2. On line 126 you use return tweet_post_agrs($tweet_status, $image_fid); but the function tweet_post_agrs does not return anything, correct it. The same thing on the line 144: return twitterpage();.
  3. On lines 151-154 replace require_once to module_load_include, and even better Use Libraries API

In the file tweet_poster.admin.inc:

  • In function tweet_poster_admin use t() function. For example instead of
      $form['consumer_key'] = array(
        '#type' => 'textfield',
        '#title' => 'Twitter Consumer Key',
        '#default_value' => variable_get('consumer_key', NULL),
      );

    use the

      $form['consumer_key'] = array(
        '#type' => 'textfield',
        '#title' => t('Twitter Consumer Key'),
        '#default_value' => variable_get('consumer_key', NULL),
      );

And most importantly, rewrite your code to Drupal Coding Standards

Sorry for my english

RavindraSingh’s picture

Status: Needs work » Needs review

Fixed all the bugs on http://ventral.org/pareview/httpgitdrupalorgsandboxitravindrasingh197073...

Moved into new branch 7.x-1.x

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/it.ravindrasingh/1970736.git tweet_poster

and @zestagio currently i am not authorizing to anonymous user access.

Libraries has been added.
twitteroauth get it from https://github.com/abraham/twitteroauth/archive/master.zip
tmhOAuth (0.7.2) get it from https://github.com/themattharris/tmhOAuth/tree/6c4a2ae0650c7855c0e242fdf...

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

RavindraSingh’s picture

Issue summary: View changes

Added sandbox Project URL

RavindraSingh’s picture

Priority: Normal » Critical
Issue tags: +PAreview: review bonus

Increased priority of the project application as per review bonus guidelines.

abhitesh.das’s picture

Priority: Critical » Normal
Status: Needs review » Needs work

Hi,

Changing the priority to normal as stated in : https://drupal.org/node/539608

Also, please fix the error mentioned by zestagio, I can still access the http://w3web.in/drupaltest/admin/config/services/tweet_poster and can even change the API keys from there as an anonymous user. This is a security threat.

Overall, the module seems to be pretty promising and useful. I am looking forward for this module.

RavindraSingh’s picture

Status: Needs work » Needs review

Thanks for your review @abhitesh.das,
It was skipped from my mind. Now it is fixed "'access arguments' => array('administer site configuration'),".

klausi’s picture

Assigned: Unassigned » jthorson
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

Review of the 7.x-1.x branch:

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    
    FILE: /home/klausi/pareview_temp/tweet_poster.admin.inc
    --------------------------------------------------------------------------------
    FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
    --------------------------------------------------------------------------------
     36 | ERROR | Files must end in a single new line character
    --------------------------------------------------------------------------------
    

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. tweet_poster.module: why do you include tweet_poster_config.php in the global scope on every single page request? You should only include it when you actually need it, or does it contain hook implementations?
  2. README.txt should mention where to get and install the library.
  3. tweet_poster_callback_form(): this function is never used, or am I missing something?
  4. You have quite a few exit calls, why do you need them? Note that drupal_goto() also calls exit. If you must use exit use drupal_exit() instead.
  5. You are using the "@" operator quite in a few places to suppress PHP errors. You should not do that, and if you must there should be a comment.

I'm not sure about the security of the workflow with the unprotected menu paths, but I could also not come up with an idea how to exploit them, so I guess this is RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to jthorson as he might have time to take a final look at this.

RavindraSingh’s picture

Status: Reviewed & tested by the community » Needs review

Thanks @klausi ,
Fixed all the given points.

klausi’s picture

Status: Needs review » Fixed

no objections for a week, so ...

Thanks for your contribution, ravindrasingh!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

PA robot’s picture

Status: Fixed » Closed (duplicate)
Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://drupal.org/node/2026039

Project 2: https://drupal.org/node/2011366

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

klausi’s picture

Status: Closed (duplicate) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Review of other projects