2011-09-26 16 views
6

मैं एक आईपैड एप्लिकेशन विकसित कर रहा हूं जिसमें फेसबबुक ग्राफ एपीआई का उपयोग करके लॉगिन किया जाता है। मेरा ऐप लैंडस्केप मोड का समर्थन करता है। मैंने एफबीजीआरपी एपीआई एकीकृत किया है, लेकिन यह लैंडस्केप मोड में नहीं आ रहा है। कृपया मुझे बताएं कि लैंडस्केप मोड में मेरा फेसबुक लॉगिन व्यू कैसे दिखाना है।एफबीजीआरपी एपीआई भूमि स्केप मोड में नहीं आ रहा है

किसी भी सुझाव की अत्यधिक सराहना की जाएगी।

+2

लॉगिन बॉक्स कौन प्रदर्शित कर रहा है? एक ब्राउज़र? एक आवेदन पत्र? लॉगिन बॉक्स को प्रदर्शित होने का अनुरोध कैसे किया जा रहा है? – DMCS

+0

बस स्पष्ट होने के लिए, क्या यह चित्र में काम करता है, या बिल्कुल नहीं? – Autonomy

+0

हाँ यह पोर्ट्रेट – Gypsa

उत्तर

1

यदि आप here से नवीनतम एसडीके का उपयोग करते हैं, तो फेसबुक लॉगिन सफारी या फेसबुक ऐप में खोला जाएगा या सीधे आईओएस 6 सेटिंग्स से लाया जाएगा। यह हमारे ऐप के अंदर लॉगिन विंडो नहीं खुलता है, और कोई अभिविन्यास समस्या नहीं होगी।

0

निम्न विधि का उपयोग कर रहा हूँ, और अपने काम कर ठीक।

दृश्य में निम्न कोड का उपयोग करें, जिसमें आप fbgraph का उपयोग करने जा रहे हैं।

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
    { 
    if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { 

    [self leftOrienation]; 
    } 
    else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight) 
    { 
    [self rightOrientation]; 
    NSLog(@"right"); 
    } 
    else 
    { 

    } 

    // Return YES for supported orientations 
    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||  interfaceOrientation == UIInterfaceOrientationLandscapeRight); 

    } 
    here i have initialized FbGraph as fbGraph. 

    -(void)leftOrienation 
    { 
    CGAffineTransform newTransform; 
    newTransform = CGAffineTransformMakeRotation(M_PI * 270/180.0f); 
    fbGraph.webView.transform = newTransform; 
    [fbGraph.webView setFrame:CGRectMake(0, 0, 768, 1024)]; 

    } 

    -(void)rightOrientation 
    { 
    CGAffineTransform newTransform; 
    newTransform = CGAffineTransformMakeRotation(M_PI * 90/180.0f); 
    fbGraph.webView.transform = newTransform; 
    [fbGraph.webView setFrame:CGRectMake(0, 0, 768, 1024)]; 

    } 
संबंधित मुद्दे