मैं अपने आईओएस ऐप को आजमाने के लिए फेसबुक में उपयोगकर्ताओं को आमंत्रित करने की कोशिश कर रहा हूं (जो अभी तक स्टोर में नहीं है, अभी तक इसे खत्म नहीं किया है)।फेसबुक में आईओएस एप्लिकेशन से फेसबुक उपयोगकर्ताओं को आमंत्रित करें: निमंत्रण नहीं भेजा जा रहा है
मैं फेसबुक एपीआई का उपयोग एक उपयोगकर्ता को प्रमाणित और उसके बाद के लिए निम्न कोड का उपयोग करने का प्रयास करें:
- (void)shareWithFriends:(id)sender
{
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Invite Friends"
message:@"If you enjoy using this app, would you mind taking a moment to invite a few friends that you think will also like it?"
delegate:self
cancelButtonTitle:@"No Thanks"
otherButtonTitles:@"Tell Friends!", nil];
[alert show];
}
- (void)alertView:(UIAlertView *)alertView
didDismissWithButtonIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) {
// User has clicked on the No Thanks button, do not ask again
NSLog(@"Chitty user says he doesn't wanna share");
} else if (buttonIndex == 1) {
// User has clicked on the Tell Friends button
[self performSelector:@selector(sendRequest) withObject:nil afterDelay:0.5];
}
}
- (void)sendRequest {
// Display the requests dialog
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:nil];
[FBWebDialogs presentRequestsDialogModallyWithSession:nil
message:[NSString stringWithFormat:@"Try this app, brah!"]
title:nil
parameters:params
handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
if (error) {
// Case A: Error launching the dialog or sending request.
NSLog(@"Error sending request.");
} else {
if (result == FBWebDialogResultDialogNotCompleted) {
// Case B: User clicked the "x" icon
NSLog(@"User canceled request.");
} else {
NSLog(@"Request Sent.");
}
}}];
}
हालांकि, जब मैं जो मैं करने के लिए निमंत्रण भेजने के लिए चाहते करने के लिए उपयोगकर्ताओं को चुनें और फिर हिट भेजें। कुछ नहीं हुआ। मुझे "अनुरोध भेजा गया" मिलता है। एनएसएलओजी के माध्यम से लेकिन मेरे दोस्त को यह प्राप्त नहीं हो रहा है।
कोई विचार?