开发者

Objective-C/iPhone - oAuthException when using "me/checkins" as part of the Facebook Graph API

I am receiving the following graph response when checking users into Facebook using the Facebook Graph API. I am using the facebook-ios-sdk within my iPhone application to do this.

{"error":{"type":"OAuthException","message":"An unexpected error has occurred. Please retry your request later."}}

I have not made any changes to my code today and I know 开发者_高级运维for a fact (database logs, etc) that their have been successful checkins yesterday.

I'm asking the SO community whether or not they have received similar errors and how they attempted to resolve them?

I have already tried the following:

  1. Revoked access to my application via Facebook.
  2. Reset my offline_access token by forcing Facebook to generate a new one.

Keep in mind my application successfully shares via peoples Facebook walls as well and this is working as expected without any problems.

I request the following permissions from my users:

@"offline_access", @"publish_stream", @"publish_checkins", @"email"

EDIT:

Okay, so this is quite strange and I'm thinking that it's an error on Facebook's end.

I use the following code to tag friends in the checkin:

if ([self.selectedFriends count] > 0) {
   [variables setObject:[self.selectedFriends componentsJoinedByString:@","] forKey:@"tags"];
}

fb_graph_response = [fbGraph doGraphPost:@"me/checkins" withPostVars:variables clientId:accessToken];

self.selectedFriends is simply an NSMutableArray of Facebook profile ID's separated by commas, which is what the graph API says to use and remember this has been working fine for months.

http://developers.facebook.com/docs/reference/api/checkin/

If I remove the [variables setObject:[self.selectedFriends componentsJoinedByString:@","] forKey:@"tags"]; then the checkin works just fine for me.

It fails every time I tag one or more friends. Is anyone else receiving the same error when tagging friends in a checkin?

UPDATE 1:

Looks like other people are receiving the same problem relating to Groups:

http://forum.developers.facebook.net/viewtopic.php?pid=349396

I wonder if there's a bug at the moment relating to Checkins.

I've posted a bug:

http://bugs.developers.facebook.net/show_bug.cgi?id=18134

UPDATE 2:

Facebook were able to reproduce the bug and they're now looking into it.


i m using checkins in one of my applications , Regarding your issue ,

Yes , you are right , i had this OAUTH Exception only when sometimes you made checkins continuously with tagging friends,

Also allow permissions like @"user_checkins", @"friends_checkins", in your application

please check this link :

http://tylerwhitedesign.com/how-to-check-in-using-the-facebook-ios-sdk-and-graph-api

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               [dictionary objectForKey:@"place"], @"place", //The PlaceID
                               coordinates, @"coordinates", // The latitude and longitude in string format (JSON)
                               message, @"message", // The status message
                               tags, @"tags", // The user's friends who are being checked in
                               nil];

[_facebook requestWithGraphPath:@"me/checkins" andParams:params andHttpMethod:@"POST" andDelegate: postCheckinRequestResult];

Hope this helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜