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.
Related
I am currently using the Salesforce.com IOS SDK Version 3.0 to build a native application that connects to salesforce. This app will be used for external users, so it is pointed at communities.
I first started by creating a Native IOS SDK app and getting that working and talking to salesforce.
I then created a new community, created a community user, gave them the proper permissions and finished setting up the community.
Next I went into the Xcode Project, under supporting files to the application plist. I then edited the SFDCOAuthLoginHost to be set to the community URL.
Once that was completed I restarted the app, and was able to login to the community through the native SDK and things would work great until the app hit its session timeout. At this point I receive these errors.
ERROR|SFNetworkOperation|callDelegateDidFailWithError Session expired or invalid
ERROR|SFNetworkOperation|Session timeout encountered. Requeue 0.000000or retry later
ERROR|SFNetworkEngine|Ignore session timeout error callback as host URL changed, request URL is https://dev-patientsupport-dev.cs21.force.com/dev/services/apexrest/patientNotifications, login host is [cs21.salesforce.com]
Of course because it cannot get a new session all web callouts fail after this point.
I have searched everywhere and cannot find a solution to this problem. My guess is that because the request is being made to the community URL, but the refreshed session is being sent from cs21.salesforce.com so it is being ignored. Thanks again for everyones time.
A fix for this bug has been submitted as part of Mobile SDK 3.1.1 patch on GitHub, npm (forceios), and Cocoapods. Please see https://plus.google.com/105428096535342044035/posts/AkoVwL5Kdt3 for more details.
It looks like this may be caused by the refresh token having its instanceURL set to the wrong destination when using communities. This may be a bug in the SDK as it works fine on the web. Try changing the instanceURL of the credentials to be the same as the URL of the community to see if that helps.
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 want to start my Dropbox-app by linking to a dropbox account as specified here:
https://www.dropbox.com/developers/datastore/tutorial/js
However, dropbox won't redirect back to my website and throws "Invalid redirect_uri"
I specified various redirect urls and double checked my app_key, but i could not get it to work. What am i doing wrong?
Thanks in advance!
When I had this issue, I realized that when refreshing the dropbox app console page, it hadn't saved my domain value. Apparently, ONLY HTTPS prefixed domains will work. When I added https it worked fine and saved my value, then I was able to get that to work with my javascript, but I was wishing that I didn't have to setup a server with a cert just to test. Security security, I guess.
http://blah.com // didn't work
https://blah.com // did work
Make sure the full, exact URL is registered as a redirect URI. (E.g. https://www.mydomain.com/mypage.html) The error message in the browser should tell you the exact URI that was attempted, so you should be able to match it perfectly.
I am brand new on this and ran into the same issue today attempting to follow the "Dropbox Datastores and Drop-Ins" tutorial on net.tutsplus.com
My setup is on a local system as well with the solution in a sub directory called "todo".
By trial and error, I got through to the authorisation screen by adding this URI in the Dropbox Developer Console: "http://LH.LH/todo/" (without quotes, AND because of comment restrictions on this board, please replace "LH.LH" with "localhost")
Btw I can see in the console, that there are some other issues with the code, but I will be looking into that.
I'm facing the same issue. It works fine locally, but not on production. I find it to be because of the redirection URI: it adds the 'http://' bit, while you can't add this to the list of supported URI in the Dropbox app list.
Try changing the url manually from the browser, removing the http:// and leaving only the domain. Does it work? If so, you have the same problem as I do... which I still don't know how to fix :(
I have inherited an app set up using built using rails using the facebooker gem. It's hosted on heroku.
I'm getting reports of users getting the following error when they try and grant permissions -
An error occurred with . Please try again later.
I've had a look through heroku's logs and can't see any errors.
Any advice on how I should debug this?
I'm going to answer my own question. I presume no one else will due to the abysmal lack of information that I provided.
the reason I'd not encountered this error before was because Facebook forced a relocation of apps to secure servers recently.
I'd neglected to change my app url in my login javascript to 'https'
Firefox & chrome did not notice the difference. Internet explorer 7 did.
In a nutshell - make sure you have the correct domain name in your facebook app settings.
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.