iPad: Cannot load facebook page wall in UIWebview
Posted
by
geekay
on Stack Overflow
See other posts from Stack Overflow
or by geekay
Published on 2012-09-27T12:44:09Z
Indexed on
2012/11/03
11:01 UTC
Read the original article
Hit count: 389
Its already too long i am struggling with this issue. After searching a lot I decided to post a question here.
What my app does
- Captures photo
- Uploads the photo on the wall of the page
- Displays the facebook page wall in a
UIWebview
after upload is complete
Everything was working as expected 4 days back :) Suddenly something went wrong :(
Code
NSString *facebookPageURL =@"https://m.facebook.com/pages/<myPageName>/<myPageID>?v=wall"
UIWebView *webView = [[UIWebView alloc] initWithFrame:kAppFrame];
[webView setUserInteractionEnabled:NO];
[webView setBackgroundColor:[UIColor clearColor]];
webView.delegate = self;
[webView setHidden: YES];
NSURL *url = [NSURL URLWithString:[facebookPageURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] relativeToURL:[NSURL URLWithString:@"http://login.facebook.com"]];
NSMutableURLRequest *request = nil;
if(url)
request = [NSMutableURLRequest requestWithURL:url];
[webView loadRequest:request];
[self.view addSubview:webView];
[webView reload];
[self.view bringSubviewToFront:webView];
webView = nil;
Scenario
- If I open the url
facebookPageURL
in Safari iniOS Simulator
it works well - If I open the url in any browser on Mac it works well
- In
webView
I see a white screen - If I change the
facebookPageURL
to remove?v=wall
to?v=info
I am stil able to see the page.(not blank screen atleast).
Note
1. My facebook Page is NOT unpublished
and is visible.
2. I have cross checked the facebook page permissions.
I suspect there is something changed on facebook side overnight.
Please guide.
© Stack Overflow or respective owner