Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Can we tweet with selected photos?
-
I don't know how to post tweet with selected photos.
Please help me.
Thanks.import twitter, ui, dialogs, console,photos def tweet(account,text,param=None): if len(text) < 140: twitter.post_tweet(account, text, parameters=param) console.hud_alert('Tweet Posted', 'success', 1.5) else: console.hud_alert('Exceeded Character Limit', 'error', 1.5) assets = photos.pick_asset(title='Pick Some Assets', multi=False) params={ 'media_id_string':assets.local_id, 'image_type':assets.media_type, 'image':{ 'w':assets.pixel_width, 'h':assets.pixel_height } } all_accounts = twitter.get_all_accounts() if len(all_accounts) >= 1: account = all_accounts[0] text = dialogs.text_dialog(title='Input Tweet') if text: tweet(account,text+' #my_hash_tag',params) else: console.hud_alert('User Canseled')