OpenFlutter / flutter_share_me

Flutter Plugin for sharing contents to social media. You can use it share to Facebook , WhatsApp , Twitter And System Share UI. Support Url and Text.
https://github.com/lizhuoyuan
Apache License 2.0
151 stars 145 forks source link

Share image to whatsapp #44

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hi Share the image to whats app not working, it just. take the message and ignore the image

lizhuoyuan commented 2 years ago

ios or android? and version?

ghost commented 2 years ago

Android version 10 & I didn't test on ios

Get Outlook for iOShttps://aka.ms/o0ukef


From: LiZhuoyuan @.> Sent: Tuesday, August 10, 2021 3:51:17 PM To: OpenFlutter/flutter_share_me @.> Cc: Almuhannad Ghaleb @.>; Author @.> Subject: Re: [OpenFlutter/flutter_share_me] Share image to whatsapp (#44)

ios or android? and version?

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/OpenFlutter/flutter_share_me/issues/44#issuecomment-896000788, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATI3EV6MDJYPJZ4GBALZ4ULT4EOELANCNFSM5B3YO6KQ.

lizhuoyuan commented 2 years ago

If the parameter of the picture is base64

ghost commented 2 years ago

yes it is in base64

Get Outlook for iOShttps://aka.ms/o0ukef


From: LiZhuoyuan @.> Sent: Thursday, August 12, 2021 11:33:36 AM To: OpenFlutter/flutter_share_me @.> Cc: Almuhannad Ghaleb @.>; Author @.> Subject: Re: [OpenFlutter/flutter_share_me] Share image to whatsapp (#44)

If the parameter of the picture is base64

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/OpenFlutter/flutter_share_me/issues/44#issuecomment-897451384, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATI3EVYSO7HSFSBXCHMI7ODT4OBOBANCNFSM5B3YO6KQ.

lizhuoyuan commented 2 years ago

try new version plz

ghost commented 2 years ago

ok I will and let you know thanks

Get Outlook for iOShttps://aka.ms/o0ukef


From: LiZhuoyuan @.> Sent: Thursday, August 12, 2021 12:01:37 PM To: OpenFlutter/flutter_share_me @.> Cc: Almuhannad Ghaleb @.>; Author @.> Subject: Re: [OpenFlutter/flutter_share_me] Share image to whatsapp (#44)

try new version plz

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/OpenFlutter/flutter_share_me/issues/44#issuecomment-897469094, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATI3EV5UAOR7HN34LJ66S3TT4OEXDANCNFSM5B3YO6KQ.

ghost commented 2 years ago

sorry for late response the same problem my friend this is my code

final directory = await getApplicationDocumentsDirectory(); final imagePath = await File('${directory.path}/${gift.id}.png').create(); final Uint8List pngBytes = capturedImage.buffer.asUint8List(); await imagePath.writeAsBytes(pngBytes); String base64Image = base64Encode(pngBytes); print("base64Image $base64Image"); var response = await FlutterShareMe() .shareToWhatsApp(msg: "*", imagePath: base64Image); print("response $response");

lizhuoyuan commented 2 years ago

print("base64Image $base64Image"); please show this result. And I am modifying the project, please use new version, and share the pictures using the local path.

ghost commented 2 years ago

Hi it is work now thanks without converting to base64 just with file path

thanks for your support

ghost commented 2 years ago

I got these errors when I tried to run on an ios device:

jigarfumakiya commented 2 years ago

Can you please try below Flutter clean pod update

ghost commented 2 years ago

Thank you so much bro😍 it works

jigarfumakiya commented 2 years ago

perfect Closing this issue.

ghost commented 2 years ago

it is happening again, I did the flutter clean & pod update but still not working

Undefined symbols for architecture arm64: "_OBJCCLASS$_FBSDKShareLinkContent", referenced from: objc-class-ref in SwiftFlutterShareMePlugin.o "_OBJCCLASS$_FBSDKShareDialog", referenced from: objc-class-ref in SwiftFlutterShareMePlugin.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) note: Using new build system note: Building targets in parallel note: Planning build note: Analyzing workspace note: Constructing build description note: Build preparation complete

*Note: RELEASE MODE