Issue for authenticating on parse.com with Twitter - ios

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”

Related

Using Callback for url schemes on Google Maps for iOS

I'm trying to use the callback functionality of the URL schemes for Google Maps on iOS.
The way how to do that is documented here.
However, I did not manage to get this to work. There is no additional symbol showing up as described in the documentation.
Is this actually still possible or has this feature been removed?
Independent of my application, I also tested this by pasting the URL scheme in the Safari browser, but it doesn't work there either.
It simply starts the Google Maps app but apparently ignores the callback parameters.
Edit:
This is the URL from the example of the documentation:
comgooglemaps-x-callback://?center=40.765819,-73.975866&zoom=14
&x-success=sourceapp://?resume=true
&x-source=SourceApp
The only difference would be that the success parameter gets the URL of the app you want to open when the user clicks on the callback button.
Check if your application's url scheme has been implemented correctly and that you're specifying a valid callback url (that directs back to your app).
Some links that might be useful:
https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Inter-AppCommunication/Inter-AppCommunication.html
http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html

Can app open browser, get user to login and receive file?

I'm trying to write an iOS Objective-C app to login to an old website. Note I don't have control of the website so I have no way of changing the login.
The procedure is:
Open browser at specific URL.
User enters their username and password.
Website returns a file called something like bad_link.smith.
App reads file to get key to use for API.
Is it possible to do this in iOS - open a URL from an app and have the file returned?
You could use UIWebView Delegates for this
Implement this https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIWebViewDelegate_Protocol/index.html#//apple_ref/occ/intfm/UIWebViewDelegate/webView:shouldStartLoadWithRequest:navigationType: delegate method and get the URL the user is going to and if the URL matches the URL you want to download then you can get the URL by the NSURLRequest and download it seperately. :) Hope I helped you.
What other thing you could do is make the code native and without the browser and simulating as a browser in the code. Can be used if no CAPTCHA is there. Do tell if you need more info on this.

iOS: Open a registered open URL from within the same app

I am running into a situation which I am not sure is possible from technical/design point of view. Please advise.
Here is what I need:
I have an open URL registered for my native iOS app. I expect a request ID to be passed along with it and once hit I open that request.
From within my native iOS app, I need to open a web page in the webview. This page has few buttons in it.
A tap on the button in the webview should open the request inside my app. So, I want to trigger the registered open URL in step #1.
Web page data is dynamic and will change on the fly.
Is this a feasible design. Shall I consider something else.
Any advise/pointers will be appreciated.
This should be possible. Here's a though:
1: Implement the UIWebview delegate method shouldStartLoadWithRequest.
2: when you intercept that your webview is attempting to access the url yourapp://blah-blah-blah you can return NO instead dip into your appdelegate can manually call the function handleOpenURL.
I've seen something similar in the past with supporting oAuth (I believe it was with instagram) within one of our apps. We basically loaded up the login page in a UIWebview and then when we detected the the post login redirect we parsed the oAuth token from the url and called it good.
Good luck

FBSdk Share dialog when FB App is not installed

I've been following Facebook code sample "FBShareSample" to create a share dialog,
The example handles the fallback for user without FB App installed.
Everything is working well with FB App but when I get to the fallback the UI in my app look different from the one in FBDemo (navigation bar, buttons etc.)
In addition the friends button is not active.
Am I missing some kind of configuration in my iOS client? Is it somehting that need to be configured on my App page on FB?
I've used Charles to analyse the request and response and the only difference between FB sample code and my code was the userAgent string.
The problem was resolved by removing from the UserAgent parameter the string: " webView", for some reason this specific string caused FB to return a different layout/CSS page when this parameter was present.

Facebook facebook-ios-sdk and graph api is not working

I am using the official facebook ios sdk in my app (https://github.com/facebook/facebook-ios-sdk)
It was all working fine. I was able to log in, pull all my info from Facebook, post things on my wall. Do all those regular stuff that you do...
But since last night, it appears to be broken. When the login window appears and the user logs in, instead of getting the authkey and getting a callback. The login window directs users to facebook.com.
Did anyone else notice the problem? Is there any fix to it or we just assume that the graph API is broken right now and wait?
I assume Facebook were just having a problem. If you had it working & did not change the code then the issue is elsewhere?
In general it's a pain to get working so the following is a brief hint to anyone who is stuck.
Having spent 2 days getting this working I recommend (assuming you have registered an app with Facebook) :
First get the demo app working.
This ensures you have your app ID and worked out how to add the URL stuff into the plist. This is explained in the docs so should not give you much trouble.
Once all the options in the demo app work (login, post, upload a sample photo) you can think about your own app.
Many things are different but you still need to have the AppDelegate method for the URL stuff. Also this method does not work as is assuming your app is using more than one view controller.
I went for the approach of setting up facebook in the app delegate eg:
Facebook *facebook
and in the actual facebook routine referencing that appDelegate's facebook object eg:
appDelegate.facebook
This approach is the subject of quite a few posts on the interweb so you should be able to google it.
I can log on, get info, post & upload photos.
I'm having the same issue, i downloaded the "official example" from gitHub, and wehn compiled it does she#. After i login, it open safari and redirects to http://www.facebook.com/connect/uiserver.php, and the app stalls. Well that's not the way to do it, Facebook. They are obsoleting the old rest api, meanwhile the "new" graph things not working. Im currently using graph API with my own calls to graph.
Check if you have done the following
1.URL scheme corresponding to your Facebook application ID is set. Your URL Schemes must contain item looking like "fb1234567890"
2.AppDelegate's method must be implemented:
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
it is described in https://github.com/facebook/facebook-ios-sdk "Authentication and Authorization".
Read also "Single Sign-On".

Resources