how to share image to email and twitter in Flutter - flutter

enter image description here
Hello Seniors, I want to share image on clicking button to email and in twitter in flutter, I did
for empty email but i want to share the image in the mail and same for twitter.
Thanks

you can use social_share package, link is
https://pub.dev/packages/social_share

try this package flutter_share_me here the link
https://pub.dev/packages/flutter_share_me

You can use share_plus package.it used to share content across different platforms
await Share.shareFiles(
imagePaths,
text: text,
subject: subject,
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size);l̥

Related

Flutter share link to other apps with a separate description

I am using the flutter share_plus library to share dynamic links for a refer a friend feature.
In the pop-up dialogue box, I want to be able to add a description that is separate from the link being shared, to explain what is happening to the user. Is there a way to do this with share_plus or is there another library I can use that has this functionality?
In the photo, where it currently says Share, I was wondering if there is any way to edit that.
Edit: I am aware that this exists for sharing files, but I am interested in sharing links.
You can use the share: ^2.0.4 package and use the text property to show the text while sharing
Share.shareFiles("image.jpg", text: 'Hello your text goes here');

How to launch WhatsApp in flutter web or launch WhatsApp from browser?

How to launch WhatsApp in Flutter web or launch WhatsApp from browser in Flutter or suggest any package from pub.dev?
You can give an anchor with href to https://api.whatsapp.com/send/?phone=(phone_number)
For full code
Send Hi to me
Note:
Make sure you give your country code without (+).
for example 6281144441111
You need the url_launcher https://pub.dev/packages/url_launcher. Import the package in you're yaml and then in your .dart
Then use the launch function with the WhatsApp URL: launch('whatsapp://send?phone=$phonenumber')
For the launching the WhatsApp Website use launch('https://web.whatsapp.com')

Link to Send a Message on FB Mobile?

My page tab app includes a link to send a message directly to the owner of the page. The same app is also available via OG links and canvas. The send message link works on desktop fine, but when in a mobile phone I would like it to display the mobile version of the send message dialog.
The link:
https://www.facebook.com/messages/USER_ID
Will open a send message dialog in Facebook desktop version.
Is there an equivalent for mobile? (ie: https://m.facebook.com/...) ?
https://m.facebook.com/messages/compose?ids=USER_ID
You can specify more than one user_id , using comma to separate them
If you want a shorter version, you can also try it with this format: https://m.me/PAGENAME
Tested with an iphone and it was working fine. You may need a username associated with the page.
you can also use this with the public id and it will redirect you to the conversation view :)
https://m.facebook.com/messages/thread/* FB ID here */
In my case, PAGENAME need to be cut name of your page and only input numbers.
ex) your page link address
https://www.facebook.com/test-12345
↓
https://m.me/12345

Add email page link button to a webpage

I'm adding social media buttons to my website. Facebook like, Twitter tweet etc buttons were very easy.
However I also need an email the page (or rather a link to the page) button. I have trawled the internet but cannot find a simple and good implementation.
Ideally I'd like to be able to copy some reliable code, and have the button look in the same style as the ones on this page: http://dl.dropbox.com/u/6920023/testbuttons.html
If anyone has done this before I would be very glad to hear from you :)
Thanks in advance.
Why not just use the AddThis service? You simply register, provide them with your website url and then select the social media / link mechanisms you would like to use on your site. At the end they provide you with a block of HTML code to drop into your site and low and behold, the buttons and appearance you selected will be present. You can also select mechanism such as pain old email when setting it up.
An example of it in place;
Here's the link: http://www.addthis.com/
As far as i know, you will have to use Mailto: apart from doing some deep Gmail, Yahoo and Hotmail API integration. That's about as good as your going to get.
You can dynamically fill out subject, body, cc fields etc using javascript/php (or whatever you are using)

Include a picture in mailto:

I'm interested in placing a picture (along with some text) in a prepared email for the user to send off. Is there any way to use mailto: to do that?
No. The mailto: scheme does not support attachment. (See http://www.faqs.org/rfcs/rfc2368.html).
If you write an app you can attach an image with MFMailComposeViewController.
No, mailto: is just a HREF target for the A tag, and just instructs the operating system to open the mail browser to a specific location (with subject). To send a custom email on click of a link, you'll need server side code, such as PHP (sendmail) or Ruby (ActionMailer)
I think the best you can do is link to an image, like this:
test