Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do you pre-authorize a facebook dialog - like an apprequest?
    text
    copied!<p>My goal is to make an apprequest button in my app that invites friends.</p> <p>The problem is that it asks me to log-in. This would not normally be a problem but in this context, the users have already input their login information to facebook in order to perform another feature within the app. That feature was written by somebody else who is not currently available.</p> <p>What ends up happening is that the user has to log-in twice. Once to use the other person's feature, once to use the apprequest dialog. I need to somehow share the credentials/authorization/session such that I do not prompt the user to login twice.</p> <p>I don't see any parameters to be passed in the standard app request dialog code to pre-authorize the attempt. I assume there's something I can do with the Facebook object. Also, I'm very new to Objective C so my understanding of the delegate stuff is really weak. I've been looking at it but I've no idea what kind of function the facebook object would want as a delegate. My understanding is that facebook can callback to the delegate, essentially giving a asynchronous ack or req or something of the sort. But how am I supposed to know what kind of a delegate it expects? What parameters will it pass? Etc.. </p> <p>Anyways, here's the very basic block of code for my app request. I've no idea where to go from here to prevent that login box from popping up twice.</p> <pre><code>Facebook *facebook = [[Facebook alloc] initWithAppId:&lt;#(NSString *)#&gt; andDelegate:&lt;#(id&lt;FBSessionDelegate&gt;)#&gt;]; // I realize I have to fill in my own AppID, which I have but I'm not entirely sure about the delegate NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"Come check out my app.", @"message", nil]; [self.facebook dialog:@"apprequests" andParams:params andDelegate:nil]; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload