2012-02-29 34 views
0

我想在不打開Facebook對話框的情況下訪問諸如性別,年齡,軍事狀態,種族等用戶信息。目前,我正在訪問令牌和Facebook ID ,現在我想訪問上面提到的信息,而不必打開Facebook對話框,當應用程序重新打開時,任何人可以告訴我如何接近它或告訴我是否有可能 在此先感謝在不打開Facebook對話框的情況下訪問facebook的詳細信息

回答

0

我們可以通過這個鏈接得到的所有URL https://developers.facebook.com/docs/coreconcepts/

https://developers.facebook.com/tools/explorer/?method=GET&path=yr app id

you can get these details 
{ 
    "id": "dasgadsksfdkjasd", 
    "name": "Allone M Hiveone", 
    "first_name": "Allone", 
    "middle_name": "M", 
    "last_name": "Hiveone", 
    "link": "https://www.facebook.com/id.emaifhfshd", 
    "username": "id.emai", 
    "birthday": "01/03/1982", 
    "location": { 
    "id": "115440481803904", 
    "name": "Ahmedabad, India" 
    }, 
    "gender": "male", 
    "relationship_status": "In a relationship", 
    "email": "[email protected]", 
    "timezone": 5.5, 
    "locale": "en_US", 
    "verified": true, 
    "updated_time": "2012-02-21T10:01:17+0000", 
    "type": "user" 
} 
+0

那好.... bytob​​y我們的示例代碼還我認爲在githuhub – Srinivas 2012-02-29 09:34:09

+0

是的,你可以,如果他在帳戶提供。 – Srinivas 2012-02-29 09:54:12

+0

https://developers.facebook.com/tools/explorer/打開你的帳戶並搜索資源管理器,然後你可以提供id到下面的utl它將工作 – Srinivas 2012-02-29 10:06:36

0

你必須得到許可,這樣的..

userDictionary = [[NSUserDefaults standardUserDefaults] valueForKey:@"USER_INFO"]; 
    [lblDOB setText:[NSString stringWithFormat:[self.userDictionary valueForKey:@"birthday"]]]; 
    [lblName setText:[NSString stringWithFormat:[self.userDictionary valueForKey:@"first_name"]]]; 
    [lblGender setText:[NSString stringWithFormat:[self.userDictionary valueForKey:@"gender"]]]; 
    [lblEmail setText:[NSString stringWithFormat:[self.userDictionary valueForKey:@"email"]]]; 
    NSString *userIDString = [NSString stringWithFormat:[self.userDictionary valueForKey:@"id"]]; 

    UIImage *imageIcon = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://graph.facebook.com/%@/picture?type=normal",userIDString]]]]; 
    [userImg setImage:imageIcon]; 
    searching = NO; 
    letUserSelectRow = YES; 
相關問題