【问题标题】:Limit providers while integrating Gigya in iPhone?在 iPhone 中集成 Gigya 时限制提供商?
【发布时间】:2011-05-14 22:27:53
【问题描述】:

我正在将 Gigya 集成到我的 iPhone 应用程序中。现在它提供了 17 个提供程序供访问,我想将其限制为只有 9 个提供程序。我该怎么做?

有没有人为 iPhone 集成了它?它加载了一个 Web 视图,该视图以分组表格式 see here 显示 17 个提供程序。

【问题讨论】:

    标签: iphone gigya


    【解决方案1】:

    要设置 Facebook 和 Twitter,您可以使用以下代码。

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

    【讨论】:

    • 谢谢,但登录后我没有得到响应,甚至 onLoginCompleted 方法也没有被调用。
    • [gsAPI showLoginUI:pParams5 delegate:self context:nil];给出登录页面,因为你的给出了添加连接页面..
    【解决方案2】:
     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

    【讨论】:

      猜你喜欢
      • 2012-12-25
      • 1970-01-01
      • 2021-07-15
      • 1970-01-01
      • 2017-10-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-05
      相关资源
      最近更新 更多