测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布版最新发布版 | 2017年9月 |
SwiftSwift 版本 | 2.3 |
由 Siddharth Chopra 维护。
KahunaSocialMedia 使用 Swift 编写
要运行示例项目,先从仓库克隆,然后从 Example 目录中首先运行 pod install
KahunaSocialMedia 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile 中
pod 'KahunaSocialMedia', '~> 0.1.15’
注意:您需要通过 Xcode.app 更新最新的 xcode 名称,它应该位于您的应用程序文件夹中
SocialDataHandler.sharedInstance.initSqliteName(kSqliteName)
let socialHandler = SocialOperationHandler.sharedInstance
socialHandler.socialDelegate = self
socialHandler.initServerBaseURL(kServerBaseURL)
socialHandler.isLoadFromServer = true (i.e. our server and false for social media server)
注意:将导入 KahunaSocialMedia 添加到对应的文件中
socialHandler.initAllTwitterKeys(kTwitterURL, tweetAccessToken: kTweetAccessToken, tweetSecretKey: kTweetAccessTokenSecret, tweetConsumerKey: kTweetConsumerKey, tweetConsumerSecret: kTweetConsumerSecret, tweetOwnerSecretName: kTweetOwnerScreenName, tweetSlugName: kTweetSlugName)
socialHandler.getTwitterFeeds()
socialHandler.initAllFacebookKeys(kFbGraphURL, fbFromName: kFbFromName, fbAppSecret: kFbAppSecret, fbAppID: kFbAppID)
socialHandler.getFacebookFeeds()
socialHandler.initAllInstagramKeys(instaURL)
socialHandler.getInstagramFeeds()
基于用户频道检索
socialHandler.initAllYoutubeKeys(kYoutubeUrl, youTubeAPIKey: kYoutubeAPIKey, youTubeUser: kYouTubeUser, videosCountForSubscriptionChannel: kVideosCountForSubscriptionChannel, countForSubscribedChannel: kCountForSubscribedChannel, userChannelId: kUserChannelId, userChannelOnly:true , isLoadFromSubscriptions: "false")
socialHandler.getYouTubeFeeds()
基于用户订阅频道检索
socialHandler.initAllYoutubeKeys(kYoutubeUrl, youTubeAPIKey: kYoutubeAPIKey, youTubeUser: kYouTubeUser, videosCountForSubscriptionChannel: kVideosCountForSubscriptionChannel, countForSubscribedChannel: kCountForSubscribedChannel, userChannelId: "", userChannelOnly:false , isLoadFromSubscriptions: isLoadFromSubscriptions)
socialHandler.getYouTubeFeeds()
siddharthchopra, [email protected]
KahunaSocialMedia可用于MIT授权协议。更多信息请参阅LICENSE文件。