【发布时间】:2011-05-14 22:27:53
【问题描述】:
我正在将 Gigya 集成到我的 iPhone 应用程序中。现在它提供了 17 个提供程序供访问,我想将其限制为只有 9 个提供程序。我该怎么做?
有没有人为 iPhone 集成了它?它加载了一个 Web 视图,该视图以分组表格式 see here 显示 17 个提供程序。
【问题讨论】:
我正在将 Gigya 集成到我的 iPhone 应用程序中。现在它提供了 17 个提供程序供访问,我想将其限制为只有 9 个提供程序。我该怎么做?
有没有人为 iPhone 集成了它?它加载了一个 Web 视图,该视图以分组表格式 see here 显示 17 个提供程序。
【问题讨论】:
要设置 Facebook 和 Twitter,您可以使用以下代码。
GSDictionary *pParams5 = [[GSDictionary new] autorelease];
[pParams5 putStringValue:@"facebook,twitter" forKey:@"enabledProviders"];
[gsAPI showAddConnectionsUI:pParams5 delegate:self context:nil];
【讨论】:
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
【讨论】: