How to invite friends to my application via facebook iOS SDK and Graph API

后端 未结 8 451
攒了一身酷
攒了一身酷 2021-02-01 17:55

I\'m writing an iPhone application.

I want to give the user the option to invite friends to start using my application via Facebook.

More specifically I want to

8条回答
  •  不思量自难忘°
    2021-02-01 18:36

    You can do something like this:

    Facebook* facebook = 
       [[Facebook alloc] initWithAppId:@"YOUR_FACEBOOK_APP_ID" andDelegate:self];
    
    NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                           @"My Title", @"title",
                                           @"Come check out my app.",  @"message",
                                           @"FACEBOOK_USER_ID", @"to",
                                           nil]; 
    
    [facebook dialog:@"apprequests" andParams:params andDelegate:self];
    

    You can see the list of possible parameters at this page (scroll down): http://developers.facebook.com/docs/reference/dialogs/requests/

提交回复
热议问题