I seem to be having an issue with the feed dialog, which I haven't had before.
I suspect it's because of iOS 5, but I'm not sure.
If the user needs authentication, he's being redirected to the Facebook app, and then returns to my app.
Afterwards, the user clicks a "Share" button, and the feed dialog appears.
But suddenly, it disappears.
If the user clicks "Share" again, the feed dialog is working just fine. It's just that first time, after returning to the app from authentication...
The code associated with the "Share" button is simply this:
if ([facebook isSessionValid]) {
[facebook dialog:#"feed" andParams:params andDelegate:self];
}
The params variable is always set to the correct values and is not nil.
If the session is not valid, the user is being sent to the authentication method.
I tried also to comment out an IF Statement in FBDialog.m which I've read somewhere, but it didn't work out.
Anyone experienced the same issue?
Thanks!
EDIT:
I'm pretty sure it's because of iOS 5 now, since I've built the project on my iPad 2, which is running iOS 4.3, and it works fine from the first time.
EDIT 2:
It's suddenly working fine. ...and I didn't change anything O_O
I had the same issue and this code change fixed it https://github.com/deyton/facebook-ios-sdk/commit/c1d3702f7c2042549c3bee050ceade7fb6f593a4
Related
I've had an issue on my app overnight that I thought was a coding bug. The issue is that the SFSafariViewController login window (Safari based) - is no longer being presented. Instead, it is launching a new Safari app, and once I log in, I now get the native iOS dialog "Open his page in "XXXXXApp"? I didn't change any settings, didn't play with anything at all. After downloading the source for the FSBDK iOS and debugging, it turns out that "SFSafariViewController" is being disabled by facebook explicitly.
I made a graph call, the same one that the app uses to start up to this endpoint:
https://graph.facebook.com/v2.7/<app-id>?fields=app_events_feature_bitmask%2Cname%2Cdefault_share_mode%2Cios_dialog_configs%2Cios_sdk_dialog_flows.os_version%289.3.0%29%2Cios_sdk_error_categories%2Csupports_implicit_sdk_logging%2Cgdpv4_nux_enabled%2Cgdpv4_nux_content%2Cios_supports_native_proxy_auth_flow%2Cios_supports_system_auth%2Capp_events_session_timeout&format=json&include_headers=false&sdk=ios
And the response appears to disable the controller SFSafariViewController. The evidence in this portion of the payload:
"ios_sdk_dialog_flows": {
"default": {
"use_native_flow": true,
"use_safari_vc": false
}
}
Previously, the use_safari_vc value was set to true. In anyone answers, please keep in mind I want to use the Safari View Controller - but not launching safari as it falls back to now. The latest behaviour asks to open my app, which I thought the Safari View Controller was meant to solve! Also keep in mind that everything was functioning well until this morning. I've tried recreating my app multiple times, but the same behaviour still persists.
Help, my user experience with Facebook is now terrible (and note, I don't care about using native behaviour - I just want Safari View Controller again!)
I'm using v4.15.0 of the Facebook SDK
Cheers
I got word from Facebook developers group that it was an issue on the server side, and that change has been reverted.
I am trying to use Twitter to authenticate on parse.com in an iOS app.
I have got to the point I have this set in my application:didFinishLaunchingWithOptions: method.
[PFTwitterUtils initializeWithConsumerKey:#"myConsumerKey”
consumerSecret:#"myConsumerSecret”];
When I tap the twitter button it shows a “Loading …” box for a few seconds and then nothing happens.
What I am missing?
I found two details (easy to miss) I needed to modify in the server settings to make things work.
The Callback URL field needs to be filled. It appeareatly doesn’
matter with what as long as it is a well formed URL. Obviously this
was in my case. I presume the content of the URL sometimes matters.
I needed to check “Allow this application to be used to Sign in with
Twitter”
We are using the legacy headers from the Facebook iOS SDK (3.1.1), as we don't want the user to be able to leave the app. This is a particular issue for us, as we are using GameKit and iOS kills the connection rather quickly after leaving the app (a few seconds is enough)
What I am doing right now, to show the login dialog is:
m_facebook = [[Facebook alloc] initWithAppId:m_fbAppId andDelegate:self];
NSArray * permissions = [NSArray arrayWithObjects:#"publish_stream",nil];
[m_facebook authorize:permissions];
However the dialog doesn't have a cancel button, so the user has no way of leaving it, except with a successful login. Is there a fix?
Best,
Gorm
If you use an older version of the Facebook SDK, the 'X' button will not appear at the top-left of the authorization dialog. Updating to the latest SDK solved the issue for me.
I use ChildBrowser and cordova - newest version. When I open ChildBrowser in my app and press the home button of my iPhone the app is running in the background.
When I click my app again, my last action window of course comes up. In this case ChildBrowser is coming up again. Of course there is an website where user must be authenticated, when I use ChildBrowser. By default the user will get logged out after one day or so because of security.
How can I check first, if the user is still authenticated before ChildBrowser is coming up again when I return to my app?
Sorry, this is the answer to my question.
RTFD! :)
http://docs.phonegap.com/en/1.0.0/phonegap_events_events.md.html#resume
I've been trying to make phonegap-plugin-facebook-connect cordova plugin Simple example work, and i've experienced a weired problem.
First I had the Facebook iOS application on my iphone:
On my test application based on the Simple example, when i click the Login button, it just switches to the Facebook iOS app, and switches back to my application.
Clicking the "Me" button gives me an error "an active access token must be used to query information about the current user" which means the login was not successful
Then I removed the Facebook iOS application from my iPhone:
It worked. It opens Safari with Facebook authorisation page, when i click OK it switches back to my application and the auth.login events are successfully fired.
Is this a known issue ? Is there a way to fix it ?
Thank you
I found a workaround:
in Facebook.m
- (void)authorize:(NSArray *)permissions {
self.permissions = permissions;
[self authorizeWithFBAppAuth: NO safariAuth:YES]; //Use Safari Auth instead of FB App
}
With this workaround Facebook iOS authorization will not be used, wheter installed or not.
Github issue#25