Use ShareSDK to share images,

Source: Internet
Author: User

Use ShareSDK to share images,

To use ShareSDK for sharing, you must apply for an open platform account and use the declared application signature package.

Private void showShare (String url, String title, String picfile) {ShareSDK. initSDK (this); OnekeyShare oks = new OnekeyShare (); // disable sso authorization oks. disableSSOWhenAuthorize (); // The Notification icon and text during sharing // oks. setNotification (R. drawable. top_meitu_2, // getString (R. string. app_name); // title, Evernote, email, information, Renren and QQ space use oks. setTitle (title); // titleUrl is the network link of the title, and oks is only used in Renren's network and QQ space. setTitleUrl (url); // text is the shared text, which is required by all platforms. setText (title + url); // imagePath is the local path of the image. Platforms other than Linked-In support this parameter // oks. setImagePath (picfile); oks. setUrl (url); // The url only uses oks in (including friends and friends. setImageUrl (picfile); // comment is my comment on this article. It is only used in Renren and QQ space. // oks. setComment ("comment"); oks. setComment (title + url); // site is the name of the website that shares the content. oks is only used in the QQ space. setSite (getString (R. string. app_name); // siteUrl is the address of the website where the content is shared, and oks is only used in the QQ space. setSiteUrl (url); // start sharing GUIoks. show (this );}

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.