Objective c Facebook - objective-c

I am developing an application that posts in IOS Facebook wall.
I'm using SDK Facebook.
My problem is if I have installed Facebook on my iPhone, when I call the permissions, it calls the Facebook app.
If i uninstall the facebook app, the authorization opens inside my application.
There's a way to open inside my application even with the Facebook app installed?

This is really not recommended because it is less secure and more of a hassle for users. However it is still currently allowed for the time being. In the Facebook.m file, change authorizeWithFBAppAuth to NO and safariAuth to NO:
[self authorizeWithFBAppAuth:NO safariAuth:NO]

Related

Authenticate web app via Spotify app instead of browser

I have a web app that is for Spotify users. To authenticate Spotify it currently takes the user to https://spotify.com/en/login?... as described in the Spotify docs. It works fine but it opens Safari instead of the Spotify app. This is an issue because a user may not know their password and then abandon the onboarding flow.
Since the user will be on their phone when accessing the web app, I would prefer to open the Spotify app in order for the user to grant us access. Songkick is able to do it but they do it from an iOS app so I'm not sure if it's possible to do from a web app on mobile to Spotify iOS app.
Also, I am building on Bubble.io which is a no-code builder. I am able to open the Spotify app directly from my web app by using https://open.spotify.com/artist/{artist_id} but that does not seem to work for authenticating.

Disable Twitter Universal Deep Links

Update: It appears Twitter has fixed this issue. Clicking the authorize button now works! Thank you all for the responses.
I have a UIWebView that opens and directs to Twitters Oauth/Authorize webpage. The user signs in with there Twitter details and authenticates the use of our application with there Twitter account. This process worked perfect before the release of Twitter 6.37 iOS application. What happens now is when the WebView detects https://twitter.com/oauth/authorize?oauth_token instead of staying in the WebView it opens the native Twitter application and dies. If you uninstall the Twitter application everything works as usually it staying within the WebView. How can I prevent this from happening? I want to stay within my UIWebView and not automatically open deep links. I have been reading about the new URL deep link changes in iOS 9, but not sure of how to stop them from my application to other native applications. Thanks for any help!
As a workaround, in twitter authentication screen we can use the Go button on iOS typing keypad instead of using the sign in button on web view until twitter fixes.
Please refer the attached screenshot link for clarity.
Screenshot for the workaround
I ran into this issue as well and figured out it was because my authorize endpoint was set to https://twitter.com/oauth/authorize?oauth_token="+oauthToken (I believe this was in the original documentation). If you add api as the subdomain: https://api.twitter.com/oauth/authorize?oauth_token="+oauthToken, it will no longer trigger the deep linking and load the twitter app.
My answer to this via a Xamarin question:
Unless Twitter removes/updates the apps section of "https://www.twitter.com/apple-app-site-association" to allow a bypass or a secondary oauth that is not in the apple-app-site-association file I do not see how you would do it. These files are signed and iOS handles them at an OS level.
I have not played around very much with the continueUserActivity delegate and the NSUserActivity object that is passed to apps launched from UNI links, but I do not see a way for the launched app (i.e. Twitter) to return control to the original app, and at that point the oauth call-chain would be broken anyway....
Unique. Unlike custom URL schemes, universal links can’t be claimed by other apps, because they use standard HTTP or HTTPS links to your website.
Secure. When users install your app, iOS checks a file that you’ve uploaded to your web server to make sure that your website allows your app to open URLs on its behalf. Only you can create and upload this file, so the association of your website with your app is secure.
Via: https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html
I would report as an issue (bug?) to Twitter's Dev forum: https://twittercommunity.com

How to do FB feed share post without leaving my hybrid app?

I am making mobile app using Sencha touch which will be bundled as native app and installed on devices. In my app on certain pages I want to add "share" functionality which is supposed to post some data to user's feed. While testing on browser I can to do that by opening a window with FB sharing url like "https://m.facebook.com/dialog/feed" or "https://m.facebook.com/sharer.php" and passing all related params as explained in https://developers.facebook.com/docs/reference/dialogs/feed/
But when this app is bundled and I share with this, user is moved to browser and cannot return to app because redirect_uri cannot point to app which is why I wanted to open this dialog within my app, probably in an iFrame. This is also not possible because these dialogs are not allowed to be embedded in iframe by META tags and in order to surpass it I have to do user login which again is another dialog which I cannot open in my app's iFrame.
I also looked at sample sencha app http://blooming-day-7830.herokuapp.com/ but it also takes user to separate login page instead of opening in-app dialog.
So my questions is how does hybrid apps connect with FB without moving out user to browser?
if you decide to use PhoneGap you can try the following two options. You will have to check for the iOS version before you switch your Phonegap call to. . .
Option 1 : for iOS before 6.0
Phonegap has a pretty nifty ChildBrowser plugin that you can use to load the FB share page without leaving the app for iOS 5.0 and below.
Option 2 : for iOS 6.0+
Facebook Share functionality has now been added to iOS. So all you have to do, is call a custom plugin class that you create, and call the standard FB share code using a basic Phonegap plugin call. You won't leave the app, the ChildBrowser doesn't have to show up, instead, you'll get the stock iOS-FB share sheet that will show up, you can add pictures, text, and so on, and post to facebook.

PIN authentication on iOS app and then listing all ios apps

I want to list all my published iOS apps list on my main ios app .
My main iOS app will perform like this: First screen will ask to enter PIN (an authorization code, user will have this code from my other web url ) after validation, next screen will show all published app (published from my developer a/c) of iTunes store. apps will be a free type category, if user click on any specific app, the itunes app should be launch to download that app on device.
Could some one please suggest me , is there any violation of Apple's rule to show my apps in this way authentication to my customers? Will apple reject my app?
Although i was trying to understand a search API of iTunes
http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html
Thanks a lot,

Launching Facebook and Twitter application from other iOS app

Hey guys,
I am still continuing to build my iPhone project and I am having trouble with launching the facebook application. First of all, I am assuming every SDK Xcode developer knows that the Facebook application doesn't have the facebook or twitter app in the simulation. Since I have a facebook page and a twitter account about my company, I can't seem to test to launch my facebook page from the facebook application or my twitter page from the twitter application because they are not there in the iOS Simulator. So I was wondering how can I open my facebook and twitter page from the facebook and twitter application if they are not there? I don't want to use a Facebook or Twitter URL, then load it into a UIWebView, I want to open the Facebook and Twitter application to launch after the click of a button in my project, then the project will close and open either Facebook or Twitter application (the ones from the app store), so hopefully someone know how they can help me step by step or if they have a code that knows how to run the facebook or twitter application and sorry if my english is not clear enough, but hopefully you can help me or have a better solution to help solve my problem, thanks
I believe the facebook app listens to URI's like fb://, so I would suggest googling around for that.
Look here for example: http://wiki.akosma.com/IPhone_URL_Schemes#Facebook