मैंने Google Plus Api लागू किया है और इसे साइट में दिया गया है के रूप में लॉगिन करें। लेकिन यह लॉगिन जब मैं उपयोग की अनुमति पर क्लिक करने के बाद समस्या दे रहा है जैसा कि नीचे दिखाया:जी + एसडीके लॉगिन त्रुटि दे रहा है?
निम्न संदेश प्रकट होता है:
मेरे कोड है इस प्रकार है, कृपया मुझे तो बताओ कुछ भी छोड़ दिया:
- (void)viewDidLoad
{
self.signInButton.delegate = self;
self.signInButton.clientID = kClientId;
self.signInButton.scope = [NSArray arrayWithObjects:
@"https://www.googleapis.com/auth/plus.me",
nil];
SLNetworkAppDelegate *appDelegate = (SLNetworkAppDelegate*)
[[UIApplication sharedApplication] delegate];
appDelegate.signInButton = self.signInButton;
share =[[GPPShare alloc] initWithClientID:kClientId];
share.delegate = self; // optional
appDelegate.share=share;
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (IBAction) didTapShare: (id)sender {
[[[[share shareDialog]
setURLToShare:[NSURL URLWithString:@"https://developers.google.com/+/mobile/ios/getting-started"]]
setPrefillText:@"testing share via google plus"] open];
// Or, without a URL or prefill text:
[[share shareDialog] open];
}
In App delegate file:
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
if ([signInButton handleURL:url
sourceApplication:sourceApplication
annotation:annotation]) {
return YES;
}
if ([self.share handleURL:url
sourceApplication:sourceApplication
annotation:annotation]) {
return YES;
}
return NO;
}
पुनर्निर्देश url आप गूगल में निर्दिष्ट कर दिया सकता है प्लस गलत मिलान है। Google प्लस क्लाइंट एप्लिकेशन में रीडायरेक्ट यूआरएल देखें और सुनिश्चित करें कि आप अपने एप्लिकेशन प्लिस्ट फ़ाइल – Sumanth
हैलो @ सुमंथ में यूआरएल हैंडलिंग को असाइन करते हैं, मैंने यूआरएल को रीडायरेक्ट नहीं किया है, कृपया मुझे बताएं कि इसे कहां निर्दिष्ट किया जा सकता है। – Warewolf
आपने Google में एक एप्लिकेशन बनाया है, इसलिए आपको kClientId मिल गया है, आपको रीडायरेक्ट यूआरएल निर्दिष्ट करने की आवश्यकता है ताकि प्रमाणीकरण सफारी ब्राउज़र यूआरएल को संभालेगा और अपना एप्लीकेशन खोल देगा – Sumanth