新浪微博第三方登陆
来源:互联网 发布:通用矩阵分析 编辑:程序博客网 时间:2024/05/06 19:57
详细的网址:http://dev.umeng.com/social/ios/detail-share#7
1.注册友盟账号
登陆友盟官网,在我的产品页面添加新应用,然后获取到AppKey
11.友盟官网:http://www.umeng.com/?ticket=ST-1448505298rhq1wxh-RATmckqADsM
2.然后选择我的产品
3.然后选择添加新应用,按要求填写内容就行,平台选择第二个苹果,然后提交并获取AppKey
4.然后下载SDK:http://dev.umeng.com/social/ios/sdk-download,勾选你需要的第三方登陆的软件,选择下载即可
5.SDK就是一个文件夹,打开文件夹有三个子文件夹,全部拖到你的工程里面就行
接下来就是代码部分,首先是Appdelegate.m部分,引入友盟头文件,代码部分写的是你获取到的AppKey
然后到你点击登陆按钮的那个页面的点击方法里面去实现
这样代码部分就实现了
然后就该配置了
第四步:
在Xcode7.0中要在plist文件中添加三段文件
第一段:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>log.umsns.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
<key>sns.whalecloud.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
<!-- 集成新浪微博对应的HTTP白名单-->
<key>sina.cn</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>weibo.cn</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>weibo.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>sinaimg.cn</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>sinajs.cn</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>sina.com.cn</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<!-- 新浪微博-->
<!-- 集成微信、QQ、Qzone、腾讯微博授权对应的HTTP白名单-->
<key>qq.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<!-- 腾讯授权-->
<!-- 集成人人授权对应的HTTP白名单-->
<key>renren.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<!-- 人人授权-->
<!-- 集成Facebook授权对应的HTTP白名单-->
<key>facebook.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>fbcdn.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>akamaihd.net</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<!-- Facebook授权-->
<!-- 集成Twitter授权对应的HTTP白名单-->
<key>twitter.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<!-- Twitter授权-->
</dict>
</dict>
第二段:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
第三段:
<key>LSApplicationQueriesSchemes</key>
<array>
<!-- 微信 URL Scheme 白名单-->
<string>wechat</string>
<string>weixin</string>
<!-- 新浪微博 URL Scheme 白名单-->
<string>sinaweibohd</string>
<string>sinaweibo</string>
<string>sinaweibosso</string>
<string>weibosdk</string>
<string>weibosdk2.5</string>
第五步:
在Link中引入SystemConfiguration.framework这个类库
第六步:
在info.plist的NSAppTransportSecurity (类型设置为dictionary)下新增NSAllowsArbitraryLoads并设置为YES
这样就完成了
- 新浪微博第三方登陆网站
- QQ,新浪微博第三方登陆
- 新浪微博第三方登陆
- web开发第三方登陆之新浪微博登陆
- 第三方登陆新浪微博java版 oauth2
- javaEE版 oauth2 第三方登陆新浪微博
- Android应用接入第三方登陆之新浪微博
- iOS 第三方登陆 —— 新浪微博
- iOS 第三方登陆 —— 新浪微博
- 调用新浪微博第三方登陆授权流程
- Android第三方登陆之新浪微博Weibo篇(原生登陆授权)
- PHP、Yii PC端接QQ、微信、新浪微博 第三方登陆
- 从零开始学新浪微博分享和第三方登陆(附源码下载)
- 从零开始学新浪微博分享和第三方登陆(附源码下载) .
- QQ 新浪微博 淘宝账号 第三方登陆 (C#)
- Android 中实现分享和第三方登陆---以新浪微博为例
- 从零开始学新浪微博分享和第三方登陆(附源码下载)
- QQ和新浪微博登陆第三方的简单实现
- python 深浅拷贝
- mybatis的等值查询
- windows内核下字符数组转Unicode
- nodejs+express+mongodb简单的例子
- 三种主流的Web服务实现方案(REST+SOAP+XML-RPC)简述及比较
- 新浪微博第三方登陆
- 在struts2中重定向加参数
- Spring配置事务
- TCP拥塞控制
- 斗地主算法逻辑中的天之道
- Fmincon in Matlab 2014a
- 遇到在html中取值时,值为null的问题
- Linux下无法清空回收站
- 用户界面控件套包ComponentOne Studio Enterprise 2015 v3全新发布