I am developing an app on rails 3.1 that will be using the facebook registration plugin. I am following this tutorial to do the integration. However, while i am developing my application on localhost:3000, when i create my facebook application on facebook, I need to enter a public URL for the application.
Currently i am using this awesome gem (localtunnel) to get me a public URL and it works fine. However the problem is that the URL it provides is just temporary until i restart localtunnel. Is there a way I can get a constant URL (any ugly url will do) so that I can continue development with facebook while facebook can also access my localhost:3000 through a public URL?
Localtunnel: http://progrium.com/localtunnel/
Hi' if it's still relevnt constant URL - https://ngrok.com/
works great
I didn't have an problem setting the Facebook app url to localhost:3000. Have you tried that? It works fine as long as you're testing it on a computer with the rails server running.
If that doesn't work, you might consider using a no-ip technology: www.no-ip.com (it's free for a subdomain)
you can use lvh.me:3000 as an alternate to localhost.
http://veerasundaravel.wordpress.com/2011/11/13/localhost-alternates-for-subdomain/
Install the heroku gem and upload your app there.
Related
Salutations all!
I purchased a Google Domain to make my app slightly more professional than just a bare Herokuapp. I'm running into issues with Oauth2 on that particular branch of the site.
I'm running rails on the back and a bit of react on the front.
I'm not sure what all you'll need, but I'll start with some bits of code and see what comes up.
The Oauth2 works just fine on the herokuapp portion and on localhost.
The error (redirect_uri_mismatch)
My authorized redirect URIs
Again, attempting to login with google on either Localhost or on Heroku works just fine.
You have a comma , after your specified domain name.
It's showing up as:
http://www.stitchinti.me/users/auth/google_oauth2_callback,
It should be
http://www.stitchinti.me/users/auth/google_oauth2_callback
Building an iOS app with Phonegap and Passport.js I point to
http://www.example.com/auth/facebook?redirectURL=...
to login. The server runs on http://www.example.com.
The ... is my question! What do I fill there?
My files are served locally, something like file:///var/...
If I redirect to window.location.href, I get JSON output.
If I redirect to http://www.example.com it works, but then I'm simply browsing the online web-app, instead of the local files (and no Cordova-plugin-support anymore)..
Please advice!
I'm developing an app using Phonegap and it implements a Facebook login to save some data using the user_id as a reference. I'm using OAuth.io library to implement the login dialog and everything runs smoothly in the web browser and in Android but when I test the app in XCode and I tap the login button the following error appears.
Cannot find hostname in file:/// from static
code: InvalidHeader
message: Cannot find hostname in file:/// from static
My guess is that it has something to do with phonegap not making an external request since the app is not actually hosted in a domain but running locally... any thoughts?
Seems like you are using oauth.js library instead of phonegap version
In your main page "index.html" add reference to the correct js file
<script src="oauth-phonegap.js"></script>
Then follow the instructions here to build your application
I had a simular issue using oauth.io. Turns out it was my Ajax prefilter changing the REQUEST to Facebook(it was adding parameters to the header for each request). Wether this is your issue or not, what you need to do is compare a successful REQUEST to Facebook to an unseccussful one, that will show you where things go wrong. Alternativly a blank phonegap app with no extra code other then the required oauth code should work and will be a Good starting point to isolate your issue.
I have been using Phonegap 2 years before.Though I didn't connect to facebook before,I connected to other website by OAuth.I can show you my solution.
Firstly,you should know how OAuth works.You can read OAuth 2.0 from facebook developer website or other websites.
Secondly,you should know your target:token,uid,expires_time.The most important thing is token.
Thirdly,just do it.In 2010,I solve this problem by using Phonegap Childbrowser plugin(now Phonegap have a inAppBrowser) and a light server.
Why I should use a light server?The server can help me to handle the redirecting in OAuth service and do cache.
Step 1 : I wrote script to connect with my server,and my server connect to OAuth Service(facebook).
Step 2 : OAuth Service(Facebook) do response and redirect to Facebook login page.
Step 3 : After input username and password,OAuth Service(Facebook) will redirect to another url and do a callback with some code or token.
Step 4 : If you get the token,save it and use it to connect OAuth Service(Facebook) if you want.
When I saw "Cannot find hostname in file:/// from static " in your description,I know that maybe you get confuse in OAuth.Now,I suggest you some server side code to handle it and make your OAuth process possible.
I am hosting a development version of a site, let's call it:
http://localhost/mysite
I am trying to create a twitter app on
https://dev.twitter.com/apps/new
However, the URL of
http://localhost/mysite/index.php
or the URL of
htpp://127.0.0.1/mysite/index.php
are not accepted. The error is:
Not a valid URL format
Is there a solution for my problem? I was searching for a solution, but, apparently twitter API has a new version and all the solutions I have found are older than the API's new version. Please, help.
if you are testing it through emulator or bluestack just change the 127.0.0.1 to 10.0.2.2
otherwiset the url(27.0.0.1/mysite/index.php ) is good. If you faced the problem then first check your localhost is working or not and you used the android.permission.internet in your manifest.
I am trying to connect facebooker and authlogic using this http://github.com/kalasjocke/authlogic_facebook_connect
I was having problems so began to debug the facebooker gem code. I realized that no params are getting set using the facebook login that have anything to do with facebook. I can push the facebook login button, it brings up the facebook window as it should and I accept/sign into facebook. Then in facebooker/rails/controller.secure_with_facebook_params! I print out params, this is what shows:
authenticity_token<pulled out token number>actioncreatecontrollerperson_sessions
person_sessions is the name of my user_sessions. Not sure if this makes a difference though...
This is it. Clearly there should be other parameters here. I checked to make sure that my application numbers are all OK with facebooker.yml (although honestly I don't understand why that would matter as I'm not yet making a facebook app, just want to use connect).
Any ideas?? I would be SOOOO thankful if someone could help me out... any clues would be useful!
K
Argh I think I finally figured it out! Since I don't have an app yet then set_asset_host_to_callback_url in facebooker.yml should be set to false. However, after this is done, you have to close browser as it seems to store previous session. Now to fix my next problem!
I had this same issue, my problem was that I had set a Site Domain on my application settings page on Facebook itself... I wasted lots of time fiddling with my code and my settings in my rails app when it was a facebook setting all along. Big up to Alex Neth on the authlogic google group in the end. So what I had was
Application ID 150132505999999
Application Secret e7fb8001d80e99999999999999999999
Site URL http:// localhost:3000
Site Domain localhost
and what I should have had was
Application ID 150132505999999
Application Secret e7fb8001d80e99999999999999999999
Site URL http:// localhost:3000
Site Domain
duh, probably an obvious one but I hope this helps someone out somewhere.
(I've had to break up the site url there for spam issues on this site)