Skip to content

Fixes #9353 Twitter notifications with certain media such as small images#9354

Merged
balloob merged 1 commit into
home-assistant:devfrom
MikeChristianson:fix-twitter-notifier-issue-9353
Sep 12, 2017
Merged

Fixes #9353 Twitter notifications with certain media such as small images#9354
balloob merged 1 commit into
home-assistant:devfrom
MikeChristianson:fix-twitter-notifier-issue-9353

Conversation

@MikeChristianson
Copy link
Copy Markdown
Contributor

Follow Twitter's guidance for media uploads:

If and (only if) the response of the FINALIZE command contains a processing_info field, it may also be necessary to use a STATUS command and wait for it to return success before proceeding to Tweet creation.

Related issue (if applicable): fixes #9353

notify:
  - name: twitter
    platform: twitter
    consumer_key: 
    consumer_secret: 
    access_token: 
    access_token_secret: 

automation twitter:
  alias: Send a test message
  initial_state: True
  hide_entity: False
  trigger:
    platform: homeassistant
    event: start
  action:
    - service: notify.twitter
      data:
        message: "Test at {{ now().strftime('%I:%M:%S %p') }}."
        data:
          media: /tmp/my-awesome-image.jpg
    - service: homeassistant.turn_off
      entity_id: automation.send_a_test_message

Follow [Twitter's guidance](https://dev.twitter.com/rest/reference/post/media/upload-finalize) for media uploads: "If and (only if) the response of the FINALIZE command contains a processing_info field, it may also be necessary to use a STATUS command and wait for it to return success before proceeding to Tweet creation."
@MikeChristianson
Copy link
Copy Markdown
Contributor Author

@balloob @pvizeli Quick fix for regression introduced my PR #9261. 🤕

@balloob balloob added this to the 0.53.1 milestone Sep 12, 2017
@balloob balloob merged commit 10c0744 into home-assistant:dev Sep 12, 2017
@MikeChristianson MikeChristianson deleted the fix-twitter-notifier-issue-9353 branch September 12, 2017 04:48
balloob pushed a commit that referenced this pull request Sep 12, 2017
Follow [Twitter's guidance](https://dev.twitter.com/rest/reference/post/media/upload-finalize) for media uploads: "If and (only if) the response of the FINALIZE command contains a processing_info field, it may also be necessary to use a STATUS command and wait for it to return success before proceeding to Tweet creation."
@balloob balloob mentioned this pull request Sep 12, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Dec 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Twitter notifier fails to post images

4 participants