How to add a Facebook friend via FB iOS SDK
I'm trying to let a u开发者_C百科ser 'add a friend' using Facebook's iOS SDK.
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"brent", @"id",
nil];
[_facebook dialog:@"friends"
andParams:params
andDelegate:self];
The dialog opens up but says 'An error occurred with . Please try again later.'
Is there something wrong with the request? Is there a way to get a more detailed error?
At this time you cannot add a friend using the Facebook iOS SDK. If you look at the request being sent out you can try calling that from a browser to get a detailed message. In my case, the error is:
An error occurred with XYZApp. Please try again later.
API Error Code: 3
API Error Description: Unknown method
Error Message: This method isn't supported for this display type
What the error message means is that this API call cannot be done from iOS.
精彩评论