`
119568242
  • 浏览: 420244 次
  • 性别: Icon_minigender_1
  • 来自: 深圳/湛江
社区版块
存档分类
最新评论

[ios]基于Social.framework 的ios6微博分享

 
阅读更多

今天扫论坛问题时看到说ios6有一个通过Social.framework的sns分享效果

就查了些资料 做了个DEMO

感觉比android通过intent实现分享还简单=-=

多一种实现分享微博的方法。

说下优缺点:

优点:

简单,快速,苹果支持什么他就支持什么[而且我们认为苹果未来绝对会支持更多的SNS]

缺点:

io6+,大陆方面目前只支持新浪微博,神马腾讯,网易,xx都没有。界面不可定制。

 

总结:感觉在显示使用中 如果不担心友盟监听你的数据的话 友盟的那套支持新浪 腾讯 人人的包会更好点。

不过未来苹果会怎么做呢?没人知道

 

 

这位写的更详细:http://www.cnblogs.com/russelljing/archive/2012/10/09/2717233.html

还写了单独支持分享某一特定SNS [如新浪微博]

 

//
//  ViewController.m
//  LrnShareSNSDemo
//
//  Created by liu poolo on 12-10-22.
//  Copyright (c) 2012年 liu poolo. All rights reserved.
//

#import "ViewController.h"
#import <Social/Social.h>

@interface ViewController ()
@property UIImage *shareImage;
@property NSString *shareText;
@end

@implementation ViewController
@synthesize shareImage=_shareImage;
- (void)viewDidLoad
{
    [super viewDidLoad];
    self.shareImage=[UIImage imageNamed:@"share_image.png"];
    self.shareText=@"现在较为蛋疼的是 用ios6自带的social.framework 发出来的 在微博来源会显示是ios而不是iphoneX 而且如果默认输入字数如果超过了限制  他会不显示  略坑爹的说";
	// Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)buttonPressed:(id)sender {
    NSLog(@"111");
    NSArray *activityItems;
    if(self.shareImage){
        activityItems=@[self.shareText,self.shareImage];
    }else{
        activityItems=@[self.shareText];
    }
    UIActivityViewController* aVC=[[UIActivityViewController alloc]initWithActivityItems:activityItems applicationActivities:nil];
    [self presentViewController:aVC animated:YES completion:nil];
}


@end
分享到:
评论

相关推荐

    Social.Framework分享社会化组件

    该源码一款实现使用Social.Framework来进行分享社会化组件,可以分享新浪微博等,是一个很不错的学习案例,喜欢的朋友可以下载学习看看。。

    iOS.9.App.Development.Essentials

    An iOS 9 Social Media Integration Tutorial using UIActivityViewController Chapter 98. iOS 9 Facebook and Twitter Integration using SLRequest Chapter 99. An iOS 9 Twitter Integration Tutorial using ...

    iOS 10 App Development Essentials

    103. An iOS 10 Social Media Integration Tutorial using UIActivityViewController 104. iOS 10 Facebook and Twitter Integration using SLRequest 105. An iOS 10 Twitter Integration Tutorial using SLRequest...

    AW.Mastering.iOS.Frameworks.Beyond.the.Basics.2nd.Edition.0134052498

    Integrating Twitter and Facebook via Social Framework Performing resource-intensive tasks with Grand Central Dispatch Securing user data with Keychain and Touch ID Customizing collection views Making ...

    iOS中调用社交平台框架例子

    本例子主要演示如何使用Account.framework、Twitter.framework以及Social.framework框架.

    iOS 6 By Tutorials

    由于包含一二卷,太大,所以分割成两部分 ... You will learn about Auto Layout, UICollectionView, Passbook, In-App Purchases, Social Framework, and more, by following along with fun, easy to read tutorials!

    EasySocial:适用于Twitter和Facebook的最简单的iOS库。 只需投入使用即可!

    适用于Twitter和Facebook的EasySocial iOS库 该库使您的应用程序可以在不了解相关SDK的情况下使用Twitter和Facebook。 它超级易于使用且设计典雅。...将Social.framework添加到您的项目 将Accounts.framework添加到您的

    史上最全的ios开发源码

    社交分享类》》ios6 Share Demo 社交分享类--Social Share TableViewCell 社交分享之KRShare 社交分享之MessageActivities 社交分享之ShareSDK 视图布局类 视图布局(View Layout)Border View 视图布局(View ...

    Windows Phone 7 Programming for Android and iOS Developers

    The combination of mobility, form factor, price, social media, and a global market is enabling scenarios that previously were either hard to imagine or to develop. Developers, both professional and ...

    Swift.2.Blueprints.1783980761

    Manipulate media using AVFoundation framework to merge audio and video. In Detail In this book, you will work through seven different projects to get you hands-on with developing amazing applications ...

    Kotlin Blueprints-Packt Publishing(2017).epub

    Chapter 6, News Feed – REST API, covers the use of Kotlin specifically to create REST services. We will develop a News Feed application with the Ktor framework, which is a leading Kotlin-only ...

    Corona.SDK.Mobile.Game.Development.Beginners.Guide.2nd.Edition

    This book is for anyone who wants to have a go at creating commercially successfully games for Android and iOS. You don't need game development or programming experience. In Detail Corona is a ...

    The Business of iPhone and iPad App: Making and Marketing Apps that Succeed

    Build synergy with in-app cross-promotion and social media, and Apple’s Game Center. Utilize revenue-generating business models such as in-app advertising and In-App Purchase. Includes extensive ...

    Learn Ionic 2: Develop Multi-platform Mobile Apps

    Explore key scenarios required for building quality Ionic apps quickly and easily and bring them to the iOS and Android mobile ecosystem. Learn Ionic 2 explains various techniques to quickly integrate...

    TwitterAPI封装Objectwitter-C.zip

    Social.framework Twitter.framework (iOS only) Security.framework (OS X only) 代码片段 初始化 Twitter API 对象: STTwitterAPI* twitter = [ STTwitterAPI ...

    Mastering.Xamarin.UI.Development.1786462001.epub

    If you are interested in creating stunning user interfaces for the iOS and Android mobile platforms using the power of Xamarin and Xamarin.Forms, then this is your ticket. This book will provide you...

    Swift 2 Blueprints 无水印pdf 0分

    Paperback: 276 pages Publisher: Packt Publishing - ebooks Account (October 27, 2015) Language: English ISBN-10: 1783980761 ...Manipulate media using AVFoundation framework to merge audio and video.

    PolygonBattleRoyale大逃杀资源

    Dungeon Architect 1.8.0 Dungeon Architect v1.7.0 Dynamic Fog Mist v6.5 Dynamic Starry Sky v1.5 Easy Main Menu 1.0f Easy Map - system v1.53 Easy Mobile Pro v2.0.0 EnhancedScroller v2.15.6 Explosive ...

    fireblogger:以Firebase 3为后端构建的Ionic 2社交媒体微博平台

    git clone https://github.com/daveozoalor/fireblogger-ionic2-firebase3-social-network 下载/克隆后更改目录并运行npm install Run cd fireblogger npm install 引入项目依赖项。 *在那之后,您需要更新您自己...

Global site tag (gtag.js) - Google Analytics