Facebook iOS SDK Checkin request not working
I am using the following piece of objective C code on top of the iOS SDK to generate a Checkin request. But no matter what I do, it always return the following non-descriptive error in didFailWithError()
. I 'do' have publish_checkins permission:
The operation couldn’t be completed. (facebookErrDomain error 10000.)
NSMutableDictionary * params = [NSMutableDictionary dictionary开发者_运维技巧WithObjectsAndKeys:
@"I am testing checkins", @"message",
@"111760725527755", @"place",
@"{\"latitude\":\"40.348718\", \"longitude\":\"-73.659047\"}", @"coordinates", nil];
[m_facebook requestWithGraphPath:@"me/checkins" andParams:params andHttpMethod:@"POST" andDelegate:self];
With raw url I get following. Graph api link:
{
"error": {
"message": "(#12) checkins API is deprecated for versions v2.0 and higher",
"type": "OAuthException",
"code": 12,
"fbtrace_id": "CxcHvZerNp+"
}
}
I am able to publish status to a feed, but publish checkin never works for me and always gives me the same "10000 error", which is not clear. I feel like I am following the doc for checks too. Am I missing something here?
I wrote up this tutorial to cover this topic. I hope it helps! http://tylerwhitedesign.com/how-to-check-in-using-the-facebook-ios-sdk-and-graph-api
I think you forgot the permission for user_checkins -->
permissions = [[NSArray arrayWithObjects: @"user_checkins", @"friends_checkins",
@"publish_checkins", nil] retain];
[facebook authorize:appID permissions:permissions delegate:self];
精彩评论