I want to publish scores of iPad game on Facebook when the game is over, game is made using cocos2d. I have made UIViewController and assigned it as delegate for FBConnect as well. I add it's subview on top of glView when i need to publish scores.But Facebook iOS SDK Single-Sign-On takes the application back to the first view of application when redirects after authorizing facebook app. I want it to simply remove this view from top view instead of going back to from where the application started. Is there any way to resume application from same point instead of restarting?
Also, how can we check if Facebook app is already authorized by a user so that application can skip authorization and can show "publish on wall" dialog start away?
If you are using Facebook lastest SDK's Single-sign on feature than the control gets out of your application. Solution is to leave SSO feature and make your custom class for Facebook connectivity. Implement login, publish and logout where you want and save access authorization in NSUSerDefaults. This post contains detail code to implement it. Hope it helps :)
Related
Im am trying to make my Xamarin iOS app use the native Facebook login but I get the browser instead of the native functionality.
I have: Url schemes, FacebookAppID, FacebookAppName in place in my info.plist
In my Facebook app I have added an iOS app and set the BundleId to my bundleId. Also I have set SingleSignon true (read that somewhere)
I have left the URL Scheme Suffix empty (don't know what to put there)
I have installed the FB app and logged in to this on the IPhone I am using but still the darn Webview is showing.
A login using the webview goes fine and if I quit the app and rerun the app the Xamarin Login button does say that I am logged in (displaying Logout)
Can anyone help?
Kind regards
Martin
Facebook has intentionally disabled switching to the native App, see blog post from late 2015: https://developers.facebook.com/blog/post/2015/10/29/Facebook-Login-iOS9
try this, it supports native fb login https://github.com/IdoTene/XamarinFormsNativeFacebook
I'm developing an iPhone app and I want to launch Facebook messenger share extension from when user wants to send a photo to one of his friends.
How can this be done?
I was able to use FBdialog, but this takes the user our of the app and I don't like this option.
Thanks.
Your application must have received permissions by the user via the access token (publish_actions). Otherwise, you'll get into the fast-app-switch, which displays a separate page.
Once a user gives your app appropriate permissions, then your FB action can be seamless, without switching across.
In a nutshell, you should implement a "login" method that users "login" to your application using Facebook (more specifically - gives your app permissions to access certain parts of their FB profile), and then you should be able to use native SDK capabilities.
If you use UIActivityViewController as long as the shared objects (NSString, UIImage, etc) are compatible it should show up automatically on the share list sheet in iOS 8.
The user may have to enable it by pressing "More"
I've created an IOS app as a Facebook Developer. So my question:
Are people able to see the app when they go into their Facebook - like in the Browser? Or are Facebook IOS apps only something that you can see in the actual app on the iphone/iPad that I'm creating?
Depending on whether the Facebook developer configured a canvas facing site will show what the end user will see.
Any application made by a third party once set to public in app settings can be viewed by anyone.
If you app is made for iOS then either the user will see a misconfigured webpage or dialog asking whether the user wants to send to mobile. All of this of course depends on how the the developer of the application sets everything.
See the documentation for detailed information
https://developers.facebook.com/docs/facebook-login/v2.2
In my application, I redirect the user to the safari browser when he/she taps on a button, which in turn closes the application and opens the safari browser. There is no problem in that. It works fine. The thing is when the user quits the safari browser, I want to redirect the user back to the application, not the home screen. Any idea please...
If you control the website that you are redirecting them to, then you can place a link on the site using custom URL which I describe in more details below. But if it's a site you don't control, you can have the user surf within your app using the UIWebView.
For an iOS app, you can create custom URL schemes that your app register with the system. Then on the web page you would create a link using that custom URL. That is how Apple launches the telephone.app or the mail.app from mobile safari.
For example: Let say your app is call BigBadApp. You custom URL would be: bigbadapp:// Now, you could create a link to your app would be: Launch BigBadApp You can pass any kind of information back to your app using the custom URL and your app will handle that information in the app delegate. For iOS 4.2 and later: application:openURL:sourceApplication:annotation:. The name of old delegate on earlier version of iOS is application:handleOpenURL:
For more information see check Apple Implementing Custom URL Schemes.
Also iOS developer:tips has a tutorial on Launching Your Own Application via a Custom URL Scheme.
You can't. When you redirect someone out of your application the only way to get back is using the task switcher or opening your application from the home screen again.
If you want to keep the user in your application you could open the web pages in a webview within your application
use UIwebViewController . that represent web link within app . so that your app wont be in back ground and add back button in navigation bar on click back button navigate to back screen . i guess it would be better
i would launch an in app browser...
this is a good uiviewcontroller subclass that has most of the browser functions already implemented. its very easy to use.
https://github.com/samvermette/SVWebViewController
I am working in face book functionality in my apps. I have integrated the latest Face book-IOS-SDK. When runs the application, the application is started and runs in the safari browser. Now I want to load the application in the user view(FB web view) instead of Safari. How can I achieve this?
Facebook doesn't want you to. Facebook's new SDK wants the user to login into Facebook once, and than that Facebook login be used in every app on the device that uses Facebook. Because of the way the iPhone works, the way they had to do that was through safari so that each app could get that info. You can go back to the original way (which so far I personally prefer), but I'm not entirely sure how.
However, if you use the new way, it will automatically redirect the user back to your app once they finish authenticating it. Also in the Safari page they can give your app permissions, ie. post status updates.