Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Send App request to facebook friends through facebook iOS sdk?

I am using facebook sdk for my my iOS facebook application. I want to send app request to multiple users. I am using following method for that purpose.

NSArray* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
                                                  @"Get Started",@"name",@"http://www.facebook.com/apps/application.php?id=135775646522275/",@"link", nil], nil];
NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               @"Check out this awesome app I am using.",@"message",
                               @"Check this out", @"notification_text",
                               @"http://www.facebook.com/apps/application.php?id=135775646522275/",@"link",
                               appImage,@"picture", 
                               actionLinksStr, @"actions",

                               nil];
[facebook dialog:@"apprequests"
       andParams:params
     andDelegate:self];

The problem is, I after calling this method, app request web view appears and app request is submitted successfully. But only app_request count on friends wall increases, Neither he gets any notification for app request, nor he can see the app request. What can be the problem, is there any other alternative way to send app request from iOS facebook app ?

like image 722
vipsk Avatar asked Nov 16 '11 07:11

vipsk


1 Answers

Here is the fix:

  1. Go to http://developers.facebook.com.
  2. Edit your app settings.
  3. Check 'App on Facebook' and 'Native iOS App'.
  4. Enter web-site URL of your app (if you have) as the Canvas URL (Secure Canvas URL can be the same).
  5. Enter iOS Bundle ID and iPhone/iPad App Store ID (You can find this info on your App page at iTunes connect).

Canvas URL is used to redirect your friend if he reviews the request from Web-site iOS Bundle ID and iPhone/iPad App Store ID are used to redirect your friend to App Store if he reviews the request from Native iOS App.

like image 124
mnickv31 Avatar answered Oct 31 '22 13:10

mnickv31