Some of the friends to share the summary

Each project basically are now embedded in the share function, and I have access to the friends of the union is SDK, he also provides a rapid share of UI, but it will inevitably encounter custom style, so the author summarizes some methods for using the SDK alliance, just with the notes, easy to inspect
  • Integrated (PS: according to their own needs to manually import the inherited SDK, otherwise the alliance will be great SDK target’UMSocialDemo’do U-Share SDK) # UI module (share panel, suggest to add “UMengUShare/UI” pod) # integrated WeChat (version 0.2M) pod’ UMengUShare/Social/ReducedWeChat’# integrated WeChat (full version of 14.4M pod UMengUShare/Social/WeChat’ “) # integrated QQ (version 0.5M) pod ‘UMengUShare/Social/ReducedQQ’ # integrated QQ (full version 7.6M) pod ‘UMengUShare/Social/QQ’ # integrated Sina micro-blog (version 1M) pod ‘UMengUShare/Social/ReducedSina’ # integrated Sina micro-blog (full version 25.3M) pod ‘UMengUShare/Social/Sina’ ‘UMengUShare/Social/Facebook’ # # integrated Facebook/Messenger pod integrated Twitter pod UMengUShare/Soc” Ial/Twitter’# integrated Alipay pod’ UMengUShare/Social/AlipayShare’pod UMengUShare/Social/DingDing’ ‘# integrated nail # integrated “UMengUShare/Social/Douban’ # bean pod pod ‘UMengUShare/Social/Renren’ # integrated all integrated Tencent micro-blog pod ‘UMengUShare/Social/ TencentWeibo’ # integrated with pod (little bug)” UMengUShare/Social/LaiWang’# integrated easecredit pod’ UMengUShare/Social/YiXin’pod UMengUShare/Social/Linkedin’ ‘# integrated led the British # integrated Flickr pod UMengUShare/Social/Flickr’ “Kakao pod” UMengUShare/Social/ Kakao’# integrated # integrated Tumblr pod’ UMengUShare/Social/Tumblr’Pinterest pod’ UMengUShare/Social/Pinterest’# integrated # integrated Instagram pod UMengUShare/Social/ ” Instagram’Line pod UMengUShare/Social/Line’ # # integrated “WhatsApp pod UMengUShare/Social/WhatsApp'” # integrated integrated ethics cloud notes’ UMengUShare/Social/YouDao’ pod pod ‘UMengUShare/Social/EverNote’ # integrated Evernote integrated Google+ pod UMengUShare/Social/ GooglePlus’#’ Pocket pod UMengUShare/Social/Pocket” # integrated # integrated DropBox pod ‘UMengUShare/Social/DropBox’ VKontakte pod ‘UMengUShare/Social/VKontakte’ # integrated # integrated mail pod ‘UMengUShare/Social/Email’ pod ‘# Integrated SMS UMengUShare/Social/SMS’ # added IDFA to obtain the pod ‘UMengUShare/Plugin/IDFA’ end
  • Add a jump in the info.plist file in the white list, it does not add the application cannot jump oh < key> LSApplicationQueriesSchemes< /key> < array> <! — WeChat URL Scheme white list –> < string> wechat< /string> < string> weixin< /string> < micro-blog URL – Sina! Scheme white list –> < string> sinaweibohd< /string> < string> sinaweibo< /string> < string> sinaweibosso< /string> < string> weibosdk< /string> < string> weibosdk2.5< /string> < QQ, Qzone URL! – Scheme white list –> < string> mqqapi< /string> < string> mqq< /string> < string> mqqOpensdkSSoLogin< /string> < string> mqqconnect< /string> < string> mqqopensdkdataline< /string> < string> mqqopensdkgrouptribeshare< /string> < string> mqqopensdkfriend< /string> < string> mqqopensdkapi< /string> < string> mqqopensdkapiV2< /string> < string> mqqopensdkapiV3< /string> < string> mqqopensdkapiV4< /string> < string> mqzoneopensdk< /string> < string> wtloginmqq< /string> < string> wtloginmqq2< /string> < string> mqqwpa< /string> < string> mqzone< /string> < string> mqzonev2< /string> < string> mqzoneshare< /string> < string> wtloginqzone< < string> string> mqzonewx< /string&gt < string> mqzoneopensdkapiV2< ; /string> < string> mqzoneopensdkapi19< /string> < string> mqzoneopensdkapi< /string> < string> mqqbrowser< /string> < string> mttbrowser< /string> <! — Alipay URL Scheme white list –> < string> alipay< /string> < string> alipayshare< /string> < URL Scheme! – nail white list –> < string> dingtalk< /string> < string> dingtalk-open< /string> –Linkedin & lt; URL Scheme! White list –> < string> linkedin< /string> < string> linkedin-sdk2< /string> < string> linkedin-sdk< /string> <! URL Scheme – the little worm white list –> &lt string&; gt; laiwangsso< /string> < URL Sche – easecredit! Me white list –> < string> yixin< /string> < string> yixinopenapi< /string> < instagram URL Scheme! – white list –> < string> instagram< /string> < WhatsApp URL Scheme! – white list –> < string> whatsapp< /string> < – line! URL Scheme –&gt < the white list; string> line< /string> < Facebook URL Scheme! – white list –> < string> fbapi< /string> < string> fb-messenger-api< /string> < string> fbauth2< /string> < string> fbshareextension< /string> < Kakao – URL Scheme! White list –> <! — Note: following the first parameter to replace their kakao appkey–& gt; <! — format for kakao + “kakao appkey –&gt”; < string> kakaofa63a0b2356e923f3edd6512d531f546< /string> < string> kakaokompassauth< /string> < string> storykompassauth< /string> < string> kakaolink< /string> < string> kakaotalk-4.5.0< /string> < string> kakaostory-2.9.0< /string> < pinterest URL Scheme! – white list –> < string> pinterestsdk.v1&lt /string> < Tumblr URL Scheme;! — white list –> < string> tumblr< /string> <! — Impression notes –> < string> evernote< /string> < string> en< /string> < string> enx< /string> < string> evernotecid< /string> < string> evernotemsg< /string> <! — ethics cloud notes –> < STR Ing> youdaonote< /string> < string> ynotedictfav< /string> < string> com.youdao.note.todayViewNote< /string> < string> ynotesharesdk< /string> < <! — Google+–> string> gplus< /string> < <! — Pocket–> string> pocket< /string> < string> readitlater< /string> < string> pocket-oauth-v1< /string> < string> fb131450656879143< /string> string> en-readitlater-5776< lt; /string> < string> com.ideashower.ReadItLaterPro3< /string> < string> com.ideashower.ReadItLaterPro< /string> < string> com.ideashower.ReadItLaterProAlpha< < string> string> com.ideashower.ReadItLaterProEnterprise< /strin G> VKontakte–> < string> vk< /string> < string> vk-share< /string> < string> vkauthorize< /string> < /array> <
  • Set the URL Scheme (target -> info -> URL Type)
    1 appKey example: wxdc1e388c3822c80b
    2.QQ/Qzone WeChat need to add two URL Scheme:
    (1) “Tencent appID
    ” + Tencent Internet application (2) “QQ” + Tencent Internet applications appID convert sixteen hex (less than 8 in front of 0) such as appID:QQ100424468 1, tencent100424468
    3 Sina micro-blog WB + Sina appKey for example: wb3921700954
  • Set the friends of the union AppKey / * appkey * / [[UMSocialManager defaultManager] alliance set setUmSocialAppkey:USHARE_DEMO_APPKEY];
  • Set the AppKey sharing platform, unified call this method, platform is the name of the platform, the platform will only be required to note: QQ appID as U-Share appKey parameters can be reached. WeChat appKey and appSecret / * * / [[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_WechatSession appKey:@ “wxdc1e388c3822c80b” appSecret:@ “3baf1193c85774b3fd9d18447d76cab0” redirectURL:@ “http://mobile.umeng.com/social”];
  • Set the system supports all iOS system / callback – (BOOL) application: (UIApplication * application) openURL: (NSURL * URL) sourceApplication: (NSString *) sourceApplication annotation: (ID) API calls the new annotation {//6.3, to be compatible with the foreign platform (for example: the new version of facebookSDK, VK and so on) call [if you use 6.2 the API call will not callback does not affect BOOL, result = [[UMSocialManager defaultManager] handleOpenURL:url sourceApplication:sourceApplication annotation:annotation] on the domestic platform; if (result!) {/ / other payment such as SDK callback return result}};
  • Custom share type, QQ and WeChat does not support photo sharing, sharing pictures or text only one of the
    1 – (void) shareTextToPlatformType: share text (UMSocialPlatformType platformType) {/ / create a share message UMSocialMessageObject * messageObject = [UMSocialMessageObject messageObject.text = messageObject]; / / set text @ social component UShare will apply the major social networking platform access your fast, armed App. “; / / call interface [[UMSocialManager defaultManager] shareToPlatform:platformType messageObject:messageObject currentViewController:self share completion:^ (ID data, NSError *error) {if (error) {NSLog (************Share fail with error @”% “@*********, error);}else{NSLog (@ response” data is, “% @ data);}}}]; 2 (void – share pictures shareImageToPlatformType: platformType (UMSocialPlatformType)) {/ / create share message UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject]; / / create a picture UMShareImageObject *shareObject = [[UMShareImageObject alloc] content object init]; / / if there is a thumbnail thumbnail is set shareObject.thumbImage = [UIImage imageNamed:@” icon “]; [shareObject setShareImage:@ “https://mobile.umeng.com/images/pic/home/social/img-1.png”]; / / share message object share content object set messageObject.shareObject = shareObject; / / [[UMSocialManager defaultManager] shareToPlatform: platformType call interface to share messageObject:messageObject currentViewController:self completion:^ (ID data, NSError *error) {if (error) {NSLog (@ ************Share fail with error%@********* “, error);}else{NSLog (” response @ data is, data);% @}]}}; 3 – (void) shareImageAndTextToPlatformType: share the graphic (UMSocialPlatformType platformType) {/ / create share message UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject]; / / set Text messageObject.text = @ social component UShare will be the major social platform access to your application, fast armed App. “; / / create a picture of UMShareImageObject *shareObject [[UMShareImageObject alloc] content object = init]; / / if there is a thumbnail thumbnail shareObject.thumbImage = [UIImage imageNamed:@” icon “]; [shareObject setShareImage:@” https:// www.umeng.com/img/index/demo/1104.4b2f7dfe614bea70eea4c6071c72d7f5.jpg “]; / / share message object share content object set messageObject.shareObject = shareObject; / / [[UMSocialManager defaultManager] shareToPlatform:platformType messageObject:messageObject share call interface (ID data currentViewController:self completion:^ NSError, *error) {if (error) {NSLog (************Share with error%@********* @” fail “, error);}else{NSLog (response data is @”% @ “, data); }]};} 4 share “- (void) shareWebPageToPlatformType: (UMSocialPlatformType platformType) {/ / create share message UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject]; / / create web content object UMShareWebpageObject *shareObject [UMShareWebpageObject = shareObjectWithTitle:@” share the title “descr:@” share content description “thumImage:[UIImage” icon “imageNamed:@”; / / set “shareObject.webpageUrl http://mobile.umeng.com/ social” [email protected] “; / / share information object set share content object messageObject.shareObject = shareObject; / / [[UMSocialManager defaultManager] shareToPlatform:platformType messageObject:messageObject call interface to share currentViewController:self completion:^ (ID data, NSErr Or *error if (error)) {{NSLog (@ ************Share fail with error%@********* “, error);}else{NSLog (” response data is @% @ “, data);}}}]; 5 share music – (void) (UMSocialPlatformType shareMusicToPlatformType: platformType) {/ / create share message UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject]; / / create music content object UMShareMusicObject = [UMShareMusicObject shareObjectWithTitle:@ *shareObject” share the title “descr:@” share content description “thumImage:[UIImage” icon “imageNamed:@”; / / broadcast address shareObject.musicUrl = @ “http://c.y.qq.com/v8/playsong.html” songid=108782194& source=yqq#wechat_redirect set the music? “; / / shareObject.musicDat AUrl = @ “here set the music data stream address (if any, but also look at the share platform support); / / share message object share content object set messageObject.shareObject = shareObject; / / [[UMSocialManager defaultManager] shareToPlatform:platformType messageObject:messageObject call interface to share currentViewController:self completion:^ (ID data, NSError *error) {{if (error) NSLog (@ ************Share fail with error%@*********”, error);}else{NSLog (“response data is @% @”, data);}} – 6}]; video sharing (void) (UMSocialPlatformType shareVedioToPlatformType: platformType) {/ / create share message UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject]; / / create video content object UMShareVideoObject *shareObject [UMShareVideoObject = shareObjectWithTitle:@ “share the title” descr:@ “share content description” thumImage:[UIImage “icon” imageNamed:@ “; / / shareObject.videoUrl = @ broadcast address” http://video.sina.com.cn/p/sports/cba/v/2013-10-22/144463050817.html “set video”; / / shareObject.videoStreamUrl = @ “here to set the video data stream address (if any, but also look at the share platform not to support”); / / share message object sharing content object set messageObject.shareObject = shareObject; / / [[UMSocialManager defaultManager] shareToPlatform:platformType messageObject:messageObject call interface to share currentViewController:self completion:^ (ID data, NSError *error) {if (error) {NSLog (@ ************Share fail with error%@********* “, error);}else{NSLog (” response data is @% @ “, data);}}}];
  • You can add a block callback in your custom content to share the success

The basic function of sharing all has been achieved, you can directly call the friends of the union of the sharing platform of UI, that is very simple, can set up a proxy monitor to share results, here is not to write, the official document above all