2015-04-07 57 views
2

如何打開某些地方的羣集應用程序的URL方案?Swarm的URL方案

我只想在我的應用程序中使用swarm應用程序。

回答

-1
NSURL *instagramURL = [NSURL URLWithString:@"instagram://"]; 
    //here write your destination application name 
     if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) 
     { 
     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]]; 

    } 
+0

謝謝,但我不知道swarm的網址方案 – goti

+0

@goti,你能簡單地解釋一下你想要的嗎? – Mehul

+1

我想要了解URL方案,它將在swarm中打開一個正確的場所 – goti

0

所有由foursquare/swarm提供的url方案在this page。您需要的方案網址在列表中不可用,您應該嘗試使用像swarm:// checkins/lat = 5 & lon = 5的網址,但不可能永遠不會到達那裏。

另一種選擇是使用Foursquare的API從您的應用發送簽到。

+0

我想找到一個URL方案,將使羣體上的Checkins – goti

+0

我很可能該URL不存在,這取決於Swarm的開發人員是否已經計劃。 – Andr3a88

0

要使用它的id準備簽入到一個特定的地點:

NSString *venueID = @"my_lovely_venue_id"; 

if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"swarm://"]]) { 
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[@"swarm://checkins/add?venueId=" stringByAppendingString:venueID]]]; 
} 
2

要鏈接到蜂擁而上:

swarm: 

要鏈接到羣應用程序的簽入屏幕:

swarm://checkins/add 

要連接到特定位置(更新位置哈希來適應):

swarm://checkins/add?venueId=560d1028498eee2df9f982f0 
+0

謝謝,直接的場地/位置checkin鏈接爲我工作! – Dan

+0

你有這些文件的鏈接? – Jake

+0

從各個地方拼湊起來,我無法回想起所有的。當然沒有官方文檔。另外,請記住,所有swarm的東西都只是四方的東西.​​.. https://groups.google.com/forum/#!topic/foursquare-api/cSyC-tCN2I4 –