2010-11-24 42 views
0

我在我的iPhone應用程序中集成G​​igya。現在它提供了17個訪問提供者,我想限制它只有9個提供者。我怎樣才能做到這一點?在iPhone中集成Gigya時限制提供商?

有沒有人爲iPhone集成它?它會加載一個網頁視圖,以分組表格形式顯示17個提供商,see here

回答

2

要設置Facebook和Twitter,您可以使用以下代碼。

GSDictionary *pParams5 = [[GSDictionary new] autorelease]; 

[pParams5 putStringValue:@"facebook,twitter" forKey:@"enabledProviders"]; 

[gsAPI showAddConnectionsUI:pParams5 delegate:self context:nil]; 
+0

感謝,但登錄後,我沒有得到響應,即使onLoginCompleted方法是沒有得到調用。 – Warrior 2010-11-25 13:26:24

0
GSAPI *gsAPI // declare this 

gsAPI = [[GSAPI alloc] initWithAPIKey:<API-KEY> viewController:self]; // i kept this in viewDidload 

// add this code to have facebook and twitter on provider list 

    GSDictionary *pParams5 = [[GSDictionary new] autorelease]; 
    [pParams5 putStringValue:@"facebook,twitter" forKey:@"enabledProviders"]; 
    [gsAPI showAddConnectionsUI:pParams5 delegate:self context:nil]; 


//this method called when login fails 
    -(void)gsLoginUIDidFail:(int)errorCode errorMessage:(NSString*)errorMessage context:(id)context{ } 

// this method called on successful login 
    - (void) gsLoginUIDidLogin:(NSString*)provider user:(GSDictionary*)user context:(id)context {} 

檢查是否有有效的API