I\'ve listed here Yahoo Integration steps which I\'ve followed.
Here is the solution.
NOTE: You would be needing an intermediate server for that.
http://10.0.0.76/iOS/yos-social-php-master/sample/sampleapp.php
URL types
, URL identifier
& URL Schemes
. as indicated in Code Block 3yourLocalServer/iOS/yos-social-php-master/sample/sampleapp.php
file. (https://github.com/yahoo/yos-social-php/blob/master/sample/sampleapp.php)Summary
Mobile App navigates to Server -> Server manages authentication via OAuth-php. Once authenticated Server retrieves profile details & server indicates safari to navigate back to - your-mobile-App. Your-mobile-app gets all details in Code Block
Code Block 1
- (IBAction)connectYahoo:(id)sender {
[[UIApplication sharedApplication]
openURL:[NSURL URLWithString:
@"http://yourLocalServer/iOS/yos-social-php-master/sample/sampleapp.php"
]];
}
Code Block 2
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
if([[url scheme] isEqualToString:@"com.yourcompany.app.fsq"]) {
return [self.obj_LoginHomeVCtr.foursquare handleOpenURL:url];
} else if([[url scheme] isEqualToString:@"com.yourcompany.app.googleplus"]){
return [GPPURLHandler handleURL:url
sourceApplication:sourceApplication
annotation:annotation];
}else if([[url scheme] isEqualToString:@"fb188315544652080"]){
return [FBAppCall handleOpenURL:url
sourceApplication:sourceApplication
fallbackHandler:^(FBAppCall *call) {
NSLog(@"In fallback handler");
}];
} else if ([[url scheme] isEqualToString:@"com.yourcompany.app.yahoo"]){
STLog(@"URL is %@",url);
return YES;
}
return YES;
}
Code block 3
CFBundleURLTypes
CFBundleTypeRole
Editor
CFBundleURLName
com.yourcompany.app.yahoo
CFBundleURLSchemes
com.yourcompany.app.yahoo
Code block 4
else if($hasSession && $profile) {
$string = "com.yourcompany.app.yahoo://response?birthdate=" . $profile->birthdate . "&familyName=" . $profile->familyName. " " . $profile->givenName . "&gender=" . $profile->gender . "&guid=" . $profile->guid . "&image=" . $profile->image->imageUrl;
echo '';
}
?>