Using The Facebook IOS SDK To Post To Friends Wall

只愿长相守 提交于 2019-12-08 04:23:45

问题


I am using the Facebook IOS SDK and I want to gain maximum exposure for an app I currently updating.

At the minute the app prompts the user to connect with facebook on the app load if the user is not already connected. If the user then connects I use the following code to send a Post to the users wall.

NSMutableDictionary *params = [NSMutableDictionary  dictionaryWithObjectsAndKeys:
                               @"http://itunes.apple.com/us/app/video-fx+/id530087007",@"link",
                               @"Video FX+ Live Video Editing",@"name",
                               @"Video FX+ is a fun, creative way to create stunning videos.",@"caption",
                               nil];
[self.facebook requestWithGraphPath:@"/me/feed"
                      andParams:params
                  andHttpMethod:@"POST"
                    andDelegate:self];

Is this the best approach? Ideally I want the post to appear on the friends wall of the user who has signed in.

Would the above work or do I need to pull a list of the users friends and then loop through that list and post the message to each individual user?

Thanks


回答1:


Posting to your own feed, will display that feed to all your online friends likely (sometime depends on facebook Most Recent/ Top story selected by your friends) so chances are they can miss it.

On the other hand posting to all of your friends first by pulling all your friends (me/friends) and iterate over all friends and post the message is one by one is no recommended as person may have 5000 friends and posting 5000 wall post likely ban / report spam your application.

So, its better to post on your own wall.




回答2:


check this out

  NSMutableDictionary *params = [NSMutableDictionary  dictionaryWithObjectsAndKeys:
                                   @"http://itunes.apple.com/us/app/video-fx+/id530087007",@"link",
                                   @"Video FX+ Live Video Editing",@"name",
                                   @"Video FX+ is a fun, creative way to create stunning videos.",@"caption",
                                   nil];
    [self.facebook requestWithGraphPath:[NSString stringWithFormat:@"%@/feed",friendFacebookID]
                          andParams:params
                      andHttpMethod:@"POST"
                        andDelegate:self];


来源:https://stackoverflow.com/questions/11050070/using-the-facebook-ios-sdk-to-post-to-friends-wall

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