mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-09 04:46:35 +10:00
add OpenGraphService openGraphWithURLString
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ DEPENDENCIES:
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
MZFayeClient:
|
||||
:path: "../CatchLib-iOS/MZFayeClient/"
|
||||
:path: ../CatchLib-iOS/MZFayeClient/
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
1PasswordExtension: a22573ad528dd63bd79c1f3b3813b17c2f86b91b
|
||||
|
||||
@@ -266,6 +266,7 @@
|
||||
50CDBE461ACA9F2200459CE0 /* ImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50CDBE451ACA9F2200459CE0 /* ImageCache.swift */; };
|
||||
50CDBE491ACBAD3200459CE0 /* ChatLeftImageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50CDBE471ACBAD3200459CE0 /* ChatLeftImageCell.swift */; };
|
||||
50CDBE4A1ACBAD3200459CE0 /* ChatLeftImageCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50CDBE481ACBAD3200459CE0 /* ChatLeftImageCell.xib */; };
|
||||
50D45FC31C44D2300044C95A /* OpenGraphService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50D45FC21C44D2300044C95A /* OpenGraphService.swift */; };
|
||||
50D4D0DB1AFA825B005AEB6F /* MediaControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50D4D0DA1AFA825B005AEB6F /* MediaControlView.swift */; };
|
||||
50DEE02C1BE209FF00015741 /* DeletedFeedConversationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50DEE02A1BE209FF00015741 /* DeletedFeedConversationCell.swift */; };
|
||||
50DEE02D1BE209FF00015741 /* DeletedFeedConversationCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50DEE02B1BE209FF00015741 /* DeletedFeedConversationCell.xib */; };
|
||||
@@ -638,6 +639,7 @@
|
||||
50CDBE451ACA9F2200459CE0 /* ImageCache.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageCache.swift; path = Caches/ImageCache.swift; sourceTree = "<group>"; };
|
||||
50CDBE471ACBAD3200459CE0 /* ChatLeftImageCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ChatLeftImageCell.swift; path = Views/Cells/ChatLeftImage/ChatLeftImageCell.swift; sourceTree = "<group>"; };
|
||||
50CDBE481ACBAD3200459CE0 /* ChatLeftImageCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ChatLeftImageCell.xib; path = Views/Cells/ChatLeftImage/ChatLeftImageCell.xib; sourceTree = "<group>"; };
|
||||
50D45FC21C44D2300044C95A /* OpenGraphService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OpenGraphService.swift; path = Services/OpenGraphService.swift; sourceTree = "<group>"; };
|
||||
50D4D0DA1AFA825B005AEB6F /* MediaControlView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MediaControlView.swift; path = Views/Media/MediaControlView.swift; sourceTree = "<group>"; };
|
||||
50DEE02A1BE209FF00015741 /* DeletedFeedConversationCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DeletedFeedConversationCell.swift; path = Views/Cells/DeletedFeedConversation/DeletedFeedConversationCell.swift; sourceTree = "<group>"; };
|
||||
50DEE02B1BE209FF00015741 /* DeletedFeedConversationCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = DeletedFeedConversationCell.xib; path = Views/Cells/DeletedFeedConversation/DeletedFeedConversationCell.xib; sourceTree = "<group>"; };
|
||||
@@ -1336,6 +1338,7 @@
|
||||
0A271FD61ACA055400822DFC /* YepAudioService.swift */,
|
||||
0A3E60661ACCAECE003DC853 /* YepLocationService.swift */,
|
||||
5016901B1BFB22180096C4F9 /* SocialWorkService.swift */,
|
||||
50D45FC21C44D2300044C95A /* OpenGraphService.swift */,
|
||||
);
|
||||
name = Services;
|
||||
sourceTree = "<group>";
|
||||
@@ -2657,6 +2660,7 @@
|
||||
0AEB1CC61B0E742400178C9C /* Double+Yep.swift in Sources */,
|
||||
50B2CA921BD0BF3800668AC6 /* FeedTextView.swift in Sources */,
|
||||
6A649A9B1BB259CB00EE4FB5 /* YepSoundEffect.swift in Sources */,
|
||||
50D45FC31C44D2300044C95A /* OpenGraphService.swift in Sources */,
|
||||
508D174C1ACCF49B0092D666 /* ChatRightAudioCell.swift in Sources */,
|
||||
502AE53D1AB87C0D005BD199 /* YepUserDefaults.swift in Sources */,
|
||||
50F5AF881BBBB2AE0033C9BC /* HorizontalLineView.swift in Sources */,
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// OpenGraphService.swift
|
||||
// Yep
|
||||
//
|
||||
// Created by nixzhu on 16/1/12.
|
||||
// Copyright © 2016年 Catch Inc. All rights reserved.
|
||||
//
|
||||
|
||||
import Alamofire
|
||||
|
||||
func openGraphWithURLString(URLString: String, failureHandler: ((Reason, String?) -> Void)?, completion: () -> Void) {
|
||||
|
||||
Alamofire.request(.GET, URLString, parameters: nil, encoding: .URL).responseString { responseString in
|
||||
println("\n openGraphWithURLString: \(URLString)\n\(responseString)")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,6 +251,19 @@ class ConversationsViewController: SegueViewController {
|
||||
|
||||
// 预先生成小头像
|
||||
cacheInAdvance()
|
||||
|
||||
// test open graph
|
||||
[
|
||||
"https://itunes.apple.com/cn/album/hello-single/id1051365605?i=1051366040&l=en",
|
||||
//"https://itun.es/cn/5_268?i=1022063849",
|
||||
//"www.douban.com",
|
||||
//"http://swiftcn.io/topics/64?f=w",
|
||||
//"https://github.com/",
|
||||
//"https://itunes.apple.com/cn/album/li-hong-er-shi-er-shi-zhou/id1022062585?i=1022063849&l=en",
|
||||
//"http://www.douban.com/note/431101390/",
|
||||
].forEach({
|
||||
openGraphWithURLString($0, failureHandler: nil, completion: {})
|
||||
})
|
||||
}
|
||||
|
||||
private func askForNotification() {
|
||||
|
||||
Reference in New Issue
Block a user