Skip to content

Share Content and Image to Facebook, twitter, Instagram, mail and to mobile number via sms.

Notifications You must be signed in to change notification settings

yudiz-solutions/YZSocialShare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YZSocial Share

Share Content and Image to Facebook, twitter, Instagram, mail and to mobile number via sms.

  • share content , url and image into social networtk like facebook, twitter, email, messanger and instagrtam
  • used native iOS api

Toast message

And here's some code! 👍

  • facebook and twitter
// facebook
YZSocialShare.shareOn(serviceType:.facebook, text:"facebook", url:"www.yudiz.com",image:UIImage(named:"steve jobs")) 

// twitter
YZSocialShare.shareOn(serviceType:.twitter, text:"twitter", url:"www.yudiz.com") 
 
  • mail and messanger (with attachment)
// mail with attchament
let attachment = (data: UIImagePNGRepresentation(UIImage(named:"steve jobs")),fileName:"steve.png") // create attachment
YZSocialShare.shareOnMail(recipients:"yogesh@itindia.co.in", subject:"Test", body:"Hello", attachment:attachment)

// Messanger 
YZSocialShare.shareOnMessanger(recipients:"9638527410","9632587410", subject:"Test", body:"Hello")

  • instagram and other apps
// instagram 

/* Add this key into plist file
                 
  <key>LSApplicationQueriesSchemes</key>
  <array>
  <string>instagram</string>
  </array>
                 
 */

 YZSocialShare.shareOnInstagram(text:"my first post", image:UIImage(named:"steve jobs"))
 
 // Other apps
 YZSocialShare.shareOn(serviceType:.otherApps,text:"Yudiz",image:UIImage(named:"steve jobs"))
                 

About

Share Content and Image to Facebook, twitter, Instagram, mail and to mobile number via sms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages