Currently if the node is saved with the "Post to Twitter" checked, a drupal message is displayed: "Successfully posted to Twitter".

The problem is if the same node is saved again with the same "Post to Twitter" settings. The duplicate tweet will not work, but the success message will still display. And there is an error in the log: exception 'TwitterException' with message 'Forbidden' in

Desired solution: The drupal message should better indicate that a duplicate tweet could not be posted.

This was first posted to #1343782: Can you tweet a node multiple times, but I was told to open a new ticket if it is a problem on 7.x-5.x.

Comments

damienmckenna’s picture

Component: Miscellaneous » Twitter Post
Priority: Minor » Normal
Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

Please test the latest -dev release and let me know if the problem persists.

pookmish’s picture

Issue still occurs for me with dev version downloaded today. message in dblog is as follow:

exception 'TwitterException' with message 'Forbidden' in /path/to/module/witter/twitter.lib.php:159 Stack trace: #0 /path/to/module/witter/twitter.lib.php(119): Twitter->request('https://api.twi...', Array, 'POST') #1 /path/to/module/witter/twitter.lib.php(1273): Twitter->auth_request('https://api.twi...', Array, 'POST') #2 /path/to/module/witter/twitter.lib.php(407): Twitter->call('statuses/update', Array, 'POST') #3 /path/to/module/witter/twitter.inc(198): Twitter->statuses_update('New post: Test ...') #4 /path/to/module/witter/twitter_post/twitter_post.module(64): twitter_set_status(Object(TwitterAccount), 'New post: Test ...') #5 /path/to/module/witter/twitter_post/twitter_post.module(82): twitter_post_entity_insert(Object(stdClass), 'node') #6 [internal function]: twitter_post_entity_update(Object(stdClass), 'node') #7 /path/to/root/includes/module.inc(934): call_user_func_array('twitter_post_en...', Array) #8 /path/to/root/modules/node/node.module(1181): module_invoke_all('entity_update', Object(stdClass), 'node') #9 /path/to/root/modules/node/node.pages.inc(460): node_save(Object(stdClass)) #10 /path/to/root/includes/form.inc(1519): node_form_submit(Array, Array) #11 /path/to/root/includes/form.inc(903): form_execute_handlers('submit', Array, Array) #12 /path/to/root/includes/form.inc(385): drupal_process_form('content_page_no...', Array, Array) #13 /path/to/root/includes/form.inc(130): drupal_build_form('content_page_no...', Array) #14 /path/to/root/modules/node/node.pages.inc(14): drupal_get_form('content_page_no...', Object(stdClass)) #15 [internal function]: node_page_edit(Object(stdClass)) #16 /path/to/root/includes/menu.inc(527): call_user_func_array('node_page_edit', Array) #17 /path/to/root/index.php(21): menu_execute_active_handler() #18 {main}

pookmish’s picture

StatusFileSize
new2.99 KB

Possible fix?

damienmckenna’s picture

Status: Postponed (maintainer needs more info) » Needs work

@pookmish: Nice work! I would suggest, however, creating a constant to handle the status ID.

pookmish’s picture

StatusFileSize
new3.46 KB

@DamienMcKenna Good idea. I should've thought of that too.

damienmckenna’s picture

Status: Needs work » Needs review

The last submitted patch, 3: twitter-duplicate_tweets-1996532.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 5: twitter-duplicate_tweets-1996532-5.patch, failed testing.