问题
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