Because it started with Sina's demo, but the demo also has this problem when the client is not installed in the case of the sharing of the link will not be displayed. Workaround:
The Wbsendmessagetoweiborequest class has a Wbmessageobject class with the text of this class that is shared content here to set the shared content to be added in the URL. The code is as follows
- (void) sharebuttonpressed{appdelegate*mydelegate = (appdelegate*) [[UIApplication sharedapplication]Delegate]; Wbauthorizerequest*authrequest =[wbauthorizerequest request]; Authrequest.redirecturi=Kredirecturi; Authrequest.scope=@" All"; Wbsendmessagetoweiborequest*request =[Wbsendmessagetoweiborequest requestwithmessage:[self Messagetoshare] authinfo:authrequest access_token: Mydelegate.wbtoken]; Request.userinfo= @{@"Sharemessagefrom":@"Sendmessagetoweiboviewcontroller", @"Other_info_1": [NSNumber Numberwithint:123], @"other_info_2": @[@"obj1",@"Obj2"], @"Other_info_3": @{@"Key1":@"obj1",@"Key2":@"Obj2"}}; //request.shouldopenweiboappinstallpageifnotinstalled = NO; //To determine if there is a client that does not exist just write if(![WEIBOSDK isweiboappinstalled]) {Request.message.text= [NSString stringWithFormat:@"%@%@", Nslocalizedstring (@"Share page title", nil),@"http://sina.cn?a=1"]; } [Weibosdk sendrequest:request];}
Messagetoshare method
-(Wbmessageobject *) messagetoshare{Wbmessageobject*message =[Wbmessageobject message]; if(self.textSwitch.on) {Message.Text= Nslocalizedstring (@"test send text to Weibo via WEIBOSDK!", nil); } if(self.imageSwitch.on) {Wbimageobject*image = [WbimageobjectObject]; Image.imagedata= [NSData datawithcontentsoffile:[[nsbundle mainbundle] Pathforresource:@"Image_1"OfType:@"jpg"]]; Message.imageobject=image; } if(self.mediaSwitch.on) {Wbwebpageobject*webpage = [WbwebpageobjectObject]; Webpage.objectid=@"Identifier1"; Webpage.title= Nslocalizedstring (@"Share page title", nil); Webpage.description= [NSString stringwithformat:nslocalizedstring (@"Share Web content Introduction-%.0f", nil), [[NSDate Date] timeIntervalSince1970]]; Webpage.thumbnaildata= [NSData datawithcontentsoffile:[[nsbundle mainbundle] Pathforresource:@"image_2"OfType:@"jpg"]]; Webpage.webpageurl=@"http://sina.cn?a=1"; Message.mediaobject=webpage; } returnmessage;}
Of course, if the integration of the code in the Messagetoshare can no longer be an example.
Address Sina Weibo not installed client sharing cannot be linked problem