2

多分誰かが私を助けることができません。

Facebook 接続には、最後の FBConnect ( http://github.com/facebook/facebook-ios-sdk/ ) を使用します。そして、ユーザーの写真アルバムのリストを取得します。

NSMutableDictionary* params = [NSMutableDictionary NictionaryWithObjectsAndKeys:_facebook.accessToken,@"access_token",nil];
[_facebook requestWithGraphPath:@"me/albums" andParams:params andDelegate:self];

プライバシーに関するすべての同じルール(アカウント/プライバシー設定)を使用して、4 つの異なるアカウントでテストしています。それらのいくつかは、アルバム リストが空です。また、iPhone で動作しないアカウントのデスクトップ コンピューター ( https://graph.facebook.com/me/albums ) でWeb ブラウザーを介してテストすると、リストは空ではありませんか?

iPhoneでは、同じ結果でグラフAPIまたはFQLを使用します(「SELECT aid FROM album WHERE owner = me()」)

多分私はfacebookappからの設定について考えることを見逃していますか?

ご回答ありがとうございます。

4

3 に答える 3

2

Facebook認証http://developers.facebook.com/docs/authentication/permissionsの適切な設定でソリューションを解決し ます

于 2010-09-15T12:51:16.950 に答える
0

publish_actions および user_photos 権限が必要です。

そして、次のコードを試してください:

[FBRequestConnection startWithGraphPath:@"me/albums"
                      completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
                          if (!error) {
                              // Success! Include your code to handle the results here
                              NSLog(@"user events: %@", result);
                              NSArray *feed =[result objectForKey:@"data"];

                              for (NSDictionary *dict in feed) {

                                  NSLog(@"first %@",dict);

                              }
                          } else {
                              // An error occurred, we need to handle the error
                              // Check out our error handling guide: https://developers.facebook.com/docs/ios/errors/
                              NSLog(@"error %@", error.description);
                          }
 }];
于 2014-11-26T22:46:01.343 に答える
0

これにより、アルバムのすべての画像がソース配列に配置されます。

NSURL *url1 = [NSURL URLWithString:[NSString stringWithFormat:@"https://graph.facebook.com/%@/photos&access_token=AAACeFkezepQBANpoFq9I3Hts0JdE6Xis3UpZBqNxpgw62zWSlhSYyYcluGaaxH3IlKIh9w8OYrXYF9MsAxhk6ta1ANZClCaznpdSaERgZDZD",A_ID]];
    URLWithString:@"https://graph.facebook.com/114750591966408/photos&access_token=//AAACeFkezepQBANpoFq9I3Hts0JdE6Xis3UyYcluGaaxH3IlKIh9w8OYrXYF9MsAxhk6ta1ANZClCaznpdSaERgZDZD"];
    NSData *data1 = [NSData dataWithContentsOfURL:url1];
    NSString *str1=[[NSString alloc] initWithData:data1 encoding:NSASCIIStringEncoding];
    // NSString *str1=[[NSString alloc]ini]
    NSDictionary *userData1 = [str1 JSONValue];
    NSArray *arrOfimages=[userData1 objectForKey:@"data"];
    NSMutableArray *sourceUrls = [[NSMutableArray alloc] initWithCapacity:0];

for(NSDictionary *subDictionary in arrOfimages) 
{

 [sourceUrls addObject:[subDictionary objectForKey:@"picture"]];

}
于 2012-08-21T12:25:15.890 に答える