mardi 31 mars 2015

Facebook album bug

I need to post the image in the "Timeline Photos" album but if doesn't exist how I can do ? Because the "timeline photos" have a different properties between any other album. This is the main part of code:



[FBRequestConnection startWithGraphPath:@"/me/albums"
parameters:nil
HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {

NSLog(@"%@",error);

if (!error) {
NSArray *feed =[result objectForKey:@"data"];
for (NSDictionary *dict in feed) {
if ([dict[@"name"] isEqualToString:@"Timeline Photos"]){
album = dict[@"id"];

}
}


This is the error:



FB Error:Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x7ba17220 {com.facebook.sdk:HTTPStatusCode=404, com.facebook.sdk:ParsedJSONResponseKey={
body = {
error = {
code = 803;
message = "(#803) Some of the aliases you requested do not exist: (null)";
type = OAuthException;
};
};
code = 404;
}, com.facebook.sdk:ErrorSessionKey=<FBSession: 0x7bacb810, state: FBSessionStateOpen, loginHandler: 0x7a6931b0, appID: 399467806871018, urlSchemeSuffix: , tokenCachingStrategy:<FBSessionTokenCachingStrategy: 0x7bab6bd0>, expirationDate: 2015-05-30 12:07:56 +0000, refreshDate: 2015-03-31 12:07:57 +0000, attemptedRefreshDate: 0000-12-30 00:00:00 +0000, permissions:(
"public_profile",
email,
"publish_actions",
"user_photos",
"user_friends"
)>}

Aucun commentaire:

Enregistrer un commentaire