iPhone facebook connection is not working with existing native facebook app - iphone

I have an iPhone app using facebook connection using FBConnect from github code.
It worked fine in the simulator, however when I installed it in the device with existing facebook app from facebook it didn't work. It opens the existing facebook app instead of returning to my own app.
How to avoid this kind of conflict using FBConnect for facebook connection with existing facebook app?
FYI, facebook app screen says "You have already authorized MagLetters. Press "Okay" to continue." however when I click "Okay" it will bring me facebook app's default page not to my app.

I would check the following:
Are you running the latest Facebook App?
Did you setup the URL Schemes in your plist file?
Are you overriding the application:handleOpenURL: method?

Related

How to use deep linking with posting photo

I have integrated facebook to my android App, and posting through the App. On below posted photo by my application I see "posted XX minutes ago via APPNAME", clicking 'APPNAME' no reaction. How can I change this link to my google play for example.
So how for example instagram or other apps redirect "via app" to their sites ?
I want my app to be able to make a share on Facebook which will appear as a link via my page. Is it possible?
I used to facebook sdk v2.0 and referenced below site. https://developers.facebook.com/docs/mobile/android/deep_linking/ I've set the below information . Settings -> Basic -> app -> Website with Facebook Login, Mobile Web, Native Android App.
But, page didn't redirect in case of Native Android Facebook app. I can't link To my native App.
You have to create a Facebook app page to get the via app name feature.
You will also have to specify native app link in the facebook app, save a key hash and specify the Launcher activity name in the facebook app to launch the app if it is installed on the android device.
If the app is not installed,clicking on the post will open the play store link.

iOS Facebook SDK,how to login within App , not in safari

Is it possible to use the Facebook iOS SDK to authenticate within an app (not go to Safari), and also keep those authentication credentials for the next launch of the app?
I have usedFacebook SDK sample code SessionLoginSample to check . It opens the Facebook login account in the safari....I want it to open with-in the app ..
I am not using FBConnect as it is been expired ...How to use it for the Facebook SDK
of
https://github.com/facebook/facebook-ios-sdk ...its sample code
https://github.com/facebook/facebook-ios-sdk/tree/master/samples/SessionLoginSample
this sample code here~~
The Facebook iOS SDK will open within the app provided your user is on iOS 6 and has their Facebook account setup within the device. Otherwise, it will gracefully fallback to the Facebook App (if installed) and then only to Safari. From the SDK Docs:
The native Login Dialog is available after a user has logged into
Facebook on their device. If the device isn't connected to Facebook,
the native Login Dialog isn't available and permission requests will
be made via the fast-app-switch to the Facebook app (if installed) or
Safari. The Facebook SDK methods [...] will seamlessly fallback to
this fast-app-switch behavior.
If your user has neither Facebook configured on their iOS 6 device nor the Facebook app installed and you still want the login to happen within your app, your best alternative might be to pull up a UIWebView pointed to your own server somewhere that carries out a server-side login.
Bear in mind a big disadvantage of a UIWebView-based approach is that your UIWebView does not share cookies with Safari so even if the user is already logged in within Safari they'll still need to re-enter their username and password again in your app. I'd be a little hesitant to do so in a third party app since there's no way to know if they're spoofing the Facebook site and phishing for my credentials.
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
login.loginBehavior = FBSDKLoginBehaviorWeb;

facebook app doesn't auth for my app

I have a problem to connect facebook app with my app.
I don't know much about facebook sdk, so I simply copy & paste from the facebook sample app.
(i only need upload image with some text).
it works well unless facebook app is installed on the device, but if a device has facebook app, it seems like can't get the login information.
I think it is because of facebook app doesn't ask auth for my app unlike safari browser.
What do I have to do?
Please Download the latest version of Facebook app (4.1.1) from app store. The Single Sign On(SSO) only supports in the latest version of Facebook application.

First time authorization fails with FBConnect via mobile app

After downloading my app from app store (or via OTA) and trying to share via FBConnect SDK, the mobile app is launched but returns almost immediately to the app with error -999, without asking user for authorizations.
After that, clicking on FB share button reopens the mobile app and all goes well, authorizations are asked, my app is called back and display the FB dialog.
That issue only happens once : if I uninstall/reinstall the app and remove the FBapp authorizations from my FB account, all goes well.
I already specified the BundleID/iTunes App ID in the "Native iOS App" menu, and use the last FacebookConnect SDK.
Anyone experienced the same issue ?

Facebook SSO authorize in safari but not facebook app in my iphone

I am following the guide exactly to integrate with Facebook. A weird issue that i run into is that, if I,
uninstall the facebook app in iphone
OR change the facebook.m implementaion to disable facebook app like
[self authorizeWithFBAppAuth:NO safariAuth:YES];
The authorize method works well in safari and get back the auth token in the url
However, if I am not doing the above 2, it will switch to facebook app, and after it says 'loading...' for a second, it gets back to me an url saying user denied. (fbxxxxxxxxxxxxx://authorize#error_reason=user%5Fdenied&error=access%5Fdenied&error_description=The%2Buser%2Bdenied%2Byour%2Brequest%2E%3F%5F)
Why it behaves so differently in the native app and browser? Is it a bug in FB iPhone app? I am using the same app and same user to test.
double check your iOS Bundle ID in facebook app setting, it has to be exact same as what you define in app.