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
UIWebview
after upload is completeEverything 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
facebookPageURL
in Safari in iOS Simulator
it works wellwebView
I see a white screenfacebookPageURL
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.
It seems the ever capricious Facebook
has removed the permission to view the wall. I came to this conclusion as when I tried the same thing in separate project I was getting both info and photos but for wall it turned grey
So Here the solution for al those suffering or might suffer form this issue.
I am getting a dictionary in response to the post
{"id":"<imge_id>","post_id":"<post_id>"}
http://www.facebook.com/photo.php?fbid=<imge_id>
and it works like a charm.
Edit:1 Just now I figured out an issue For the pages with an age restriction, we need to authenticate which SSO doesn't supports for UIWebView inside my app.
I had to downgrade to NOT using SSO anymore. And now it works no matter what.
Just to add here you can find how to neatly downgrading to non-sso
mechanism.