Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yudiz-solutions/yzsocialshare

Share Content and Image to Facebook, twitter, Instagram, mail and to mobile number via sms.
https://github.com/yudiz-solutions/yzsocialshare

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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](https://github.com/yudiz-solutions/YMSocialShare/blob/master/Screenshort/image.gif)

And here's some code! :+1:
* 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:"[email protected]", 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

LSApplicationQueriesSchemes

instagram


*/

YZSocialShare.shareOnInstagram(text:"my first post", image:UIImage(named:"steve jobs"))

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

```