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

守給你的承諾、 提交于 2019-12-03 13:36:52

问题


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 ?


回答1:


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.



来源:https://stackoverflow.com/questions/8148244/how-to-send-app-request-to-facebook-friends-through-facebook-ios-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!